提交 73d8c34f 编写于 作者: A Alan Stern 提交者: Jiri Kosina

SCSI: improve two error messages

This trivial patch (as1338) makes two uninformative error messages in
scsi_sysfs_add_sdev() more explicit.
Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 db6857c6
...@@ -864,13 +864,15 @@ int scsi_sysfs_add_sdev(struct scsi_device *sdev) ...@@ -864,13 +864,15 @@ int scsi_sysfs_add_sdev(struct scsi_device *sdev)
error = device_add(&sdev->sdev_gendev); error = device_add(&sdev->sdev_gendev);
if (error) { if (error) {
printk(KERN_INFO "error 1\n"); sdev_printk(KERN_INFO, sdev,
"failed to add device: %d\n", error);
return error; return error;
} }
device_enable_async_suspend(&sdev->sdev_dev); device_enable_async_suspend(&sdev->sdev_dev);
error = device_add(&sdev->sdev_dev); error = device_add(&sdev->sdev_dev);
if (error) { 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); device_del(&sdev->sdev_gendev);
return error; return error;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册