summaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi_sysfs.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2010-11-16 00:03:04 +0300
committerJiri Kosina <jkosina@suse.cz>2010-11-26 17:43:34 +0300
commit73d8c34f3d78ccf90a431c221df10377affce650 (patch)
treea91a46b5a9634ca28ffd0adf993f20c1cadf2e95 /drivers/scsi/scsi_sysfs.c
parentdb6857c6e700111e2787b8e08ef1a7ceae363e03 (diff)
downloadlinux-73d8c34f3d78ccf90a431c221df10377affce650.tar.xz
SCSI: improve two error messages
This trivial patch (as1338) makes two uninformative error messages in scsi_sysfs_add_sdev() more explicit. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
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 20ad59dff730..9c52ce4f7129 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)
error = device_add(&sdev->sdev_gendev);
if (error) {
- printk(KERN_INFO "error 1\n");
+ sdev_printk(KERN_INFO, sdev,
+ "failed to add device: %d\n", error);
return error;
}
device_enable_async_suspend(&sdev->sdev_dev);
error = device_add(&sdev->sdev_dev);
if (error) {
- printk(KERN_INFO "error 2\n");
+ sdev_printk(KERN_INFO, sdev,
+ "failed to add class device: %d\n", error);
device_del(&sdev->sdev_gendev);
return error;
}