summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_sysfs.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2017-09-20 09:18:52 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2017-09-26 01:03:22 +0200
commit2930f817132959254db801fe19e61c477293ad6b (patch)
tree57bf1681caed48258094ac628461771be2aa7053 /drivers/scsi/scsi_sysfs.c
parentscsi: scsi_dh: Return SCSI_DH_XX error code from ->attach() (diff)
downloadlinux-2930f817132959254db801fe19e61c477293ad6b.tar.xz
linux-2930f817132959254db801fe19e61c477293ad6b.zip
scsi: scsi_dh: suppress errors from unsupported devices
Device handlers are optional, and for some handlers like ALUA only implemented for certain device types. So suppress any errors for unsupported devices. Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_sysfs.c')
-rw-r--r--drivers/scsi/scsi_sysfs.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index bf53356f41f0..cfc5e316f6cb 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -1234,13 +1234,7 @@ int scsi_sysfs_add_sdev(struct scsi_device *sdev)
scsi_autopm_get_device(sdev);
- error = scsi_dh_add_device(sdev);
- if (error)
- /*
- * device_handler is optional, so any error can be ignored
- */
- sdev_printk(KERN_INFO, sdev,
- "failed to add device handler: %d\n", error);
+ scsi_dh_add_device(sdev);
error = device_add(&sdev->sdev_gendev);
if (error) {