aboutsummaryrefslogtreecommitdiff
path: root/drivers/s390/char/tape_class.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/char/tape_class.c')
-rw-r--r--drivers/s390/char/tape_class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c
index 643b6d07856..56b87618b10 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(