summaryrefslogtreecommitdiff
path: root/drivers/s390/char/vmlogrdr.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/vmlogrdr.c
parente16c5dd5157efeddaad7492b920192fea0e7e4ec (diff)
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/vmlogrdr.c')
-rw-r--r--drivers/s390/char/vmlogrdr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c
index b19020b9efff..62559dc0169f 100644
--- a/drivers/s390/char/vmlogrdr.c
+++ b/drivers/s390/char/vmlogrdr.c
@@ -812,8 +812,7 @@ static int vmlogrdr_register_cdev(dev_t dev)
}
vmlogrdr_cdev->owner = THIS_MODULE;
vmlogrdr_cdev->ops = &vmlogrdr_fops;
- vmlogrdr_cdev->dev = dev;
- rc = cdev_add(vmlogrdr_cdev, vmlogrdr_cdev->dev, MAXMINOR);
+ rc = cdev_add(vmlogrdr_cdev, dev, MAXMINOR);
if (!rc)
return 0;