Skip to content

Commit

Permalink
[S390] tape class return value handling.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Aug 7, 2006
1 parent 9f73763 commit 25a2001
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/s390/char/tape_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 25a2001

Please sign in to comment.