aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_sysfs.c')
-rw-r--r--drivers/scsi/scsi_sysfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 76ee2e784f75..8dc1f00aa5e8 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -864,13 +864,15 @@ int scsi_sysfs_add_sdev(struct scsi_device *sdev)
864 864
865 error = device_add(&sdev->sdev_gendev); 865 error = device_add(&sdev->sdev_gendev);
866 if (error) { 866 if (error) {
867 printk(KERN_INFO "error 1\n"); 867 sdev_printk(KERN_INFO, sdev,
868 "failed to add device: %d\n", error);
868 return error; 869 return error;
869 } 870 }
870 device_enable_async_suspend(&sdev->sdev_dev); 871 device_enable_async_suspend(&sdev->sdev_dev);
871 error = device_add(&sdev->sdev_dev); 872 error = device_add(&sdev->sdev_dev);
872 if (error) { 873 if (error) {
873 printk(KERN_INFO "error 2\n"); 874 sdev_printk(KERN_INFO, sdev,
875 "failed to add class device: %d\n", error);
874 device_del(&sdev->sdev_gendev); 876 device_del(&sdev->sdev_gendev);
875 return error; 877 return error;
876 } 878 }