summaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/tape_class.c
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2017-09-18 11:13:13 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2017-09-28 07:29:41 +0200
commitb08e19defc10befc50af09771ff0b086f2a72138 (patch)
tree7d1b4a799d66482d9deb8109dbabbde18d3f3804 /drivers/s390/char/tape_class.c
parentsamples/kprobes: Add s390 case in kprobe example module (diff)
downloadlinux-b08e19defc10befc50af09771ff0b086f2a72138.tar.xz
linux-b08e19defc10befc50af09771ff0b086f2a72138.zip
s390/char: fix cdev_add usage
Function cdev_add does set cdev->dev, so there is no point in setting it prior to calling this function. Signed-off-by: Jean Delvare <jdelvare@suse.de> 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/tape_class.c')
-rw-r--r--drivers/s390/char/tape_class.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c
index 91c3c642c76e..e7d23048d3f0 100644
--- a/drivers/s390/char/tape_class.c
+++ b/drivers/s390/char/tape_class.c
@@ -68,9 +68,8 @@ struct tape_class_device *register_tape_dev(
tcd->char_device->owner = fops->owner;
tcd->char_device->ops = fops;
- tcd->char_device->dev = dev;
- rc = cdev_add(tcd->char_device, tcd->char_device->dev, 1);
+ rc = cdev_add(tcd->char_device, dev, 1);
if (rc)
goto fail_with_cdev;