aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/sg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index e65f5d432662..ebbf9b4b7e90 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -1422,7 +1422,6 @@ sg_add(struct class_device *cl_dev, struct class_interface *cl_intf)
1422 goto out; 1422 goto out;
1423 } 1423 }
1424 1424
1425 class_set_devdata(cl_dev, sdp);
1426 error = cdev_add(cdev, MKDEV(SCSI_GENERIC_MAJOR, sdp->index), 1); 1425 error = cdev_add(cdev, MKDEV(SCSI_GENERIC_MAJOR, sdp->index), 1);
1427 if (error) 1426 if (error)
1428 goto cdev_add_err; 1427 goto cdev_add_err;
@@ -1451,6 +1450,8 @@ sg_add(struct class_device *cl_dev, struct class_interface *cl_intf)
1451 "Attached scsi generic sg%d type %d\n", sdp->index, 1450 "Attached scsi generic sg%d type %d\n", sdp->index,
1452 scsidp->type); 1451 scsidp->type);
1453 1452
1453 class_set_devdata(cl_dev, sdp);
1454
1454 return 0; 1455 return 0;
1455 1456
1456cdev_add_err: 1457cdev_add_err: