diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-08-07 17:00:28 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-08-07 17:00:28 +0200 |
commit | 25a2001a285e187d99ea347693bedd73b3e0722a (patch) | |
tree | beb8855dc37c0593ebc6fe325e208b4696741101 /drivers/s390/char | |
parent | 9f737633e6ee54fc174282d49b2559bd2208391d (diff) | |
download | blackbird-op-linux-25a2001a285e187d99ea347693bedd73b3e0722a.tar.gz blackbird-op-linux-25a2001a285e187d99ea347693bedd73b3e0722a.zip |
[S390] tape class return value handling.
Without this patch register_tape_dev() will always fail, but might
return a value that is not an error number. This will lead to accesses
to already freed memory areas...
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char')
-rw-r--r-- | drivers/s390/char/tape_class.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c index 643b6d078563..56b87618b100 100644 --- a/drivers/s390/char/tape_class.c +++ b/drivers/s390/char/tape_class.c @@ -76,7 +76,7 @@ struct tape_class_device *register_tape_dev( device, "%s", tcd->device_name ); - rc = PTR_ERR(tcd->class_device); + rc = IS_ERR(tcd->class_device) ? PTR_ERR(tcd->class_device) : 0; if (rc) goto fail_with_cdev; rc = sysfs_create_link( |