diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-21 12:03:57 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-21 12:03:57 -0700 |
commit | 53a4998229efbf5cb79ec7ca7c18f4c86f66755d (patch) | |
tree | e6c9be05fe944b70fa4ede3849a55b273ec068bd /drivers/s390/char/tape_class.c | |
parent | 3bda2418b94243d5e43fcfe48d9de70cb0d2423e (diff) | |
parent | d7cf0d57ef9e07cf0f65c58c19a8e7c4a9db72b5 (diff) |
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
[S390] sysfs_create_xxx return values.
[S390] .align 4096 statements in head.S
[S390] get_clock inline assembly.
[S390] channel measurement interval display.
[S390] xpram module parameter parsing - take 2.
[S390] Fix gcc warning about unused return values.
Diffstat (limited to 'drivers/s390/char/tape_class.c')
-rw-r--r-- | drivers/s390/char/tape_class.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c index a5c68e60fcf..643b6d07856 100644 --- a/drivers/s390/char/tape_class.c +++ b/drivers/s390/char/tape_class.c @@ -76,14 +76,22 @@ struct tape_class_device *register_tape_dev( device, "%s", tcd->device_name ); - sysfs_create_link( + rc = PTR_ERR(tcd->class_device); + if (rc) + goto fail_with_cdev; + rc = sysfs_create_link( &device->kobj, &tcd->class_device->kobj, tcd->mode_name ); + if (rc) + goto fail_with_class_device; return tcd; +fail_with_class_device: + class_device_destroy(tape_class, tcd->char_device->dev); + fail_with_cdev: cdev_del(tcd->char_device); |