diff options
author | Hannes Reinecke <hare@suse.de> | 2016-03-01 13:57:59 +1100 |
---|---|---|
committer | Joel Stanley <joel@jms.id.au> | 2016-03-03 11:37:35 +1030 |
commit | db2e8cc68f99b3c8f7fe01600ed62450dd7bd12e (patch) | |
tree | 4463ce2536493010efcf63d44e7aadb729109df7 | |
parent | c530d7ca1a5e8645b8a8a9496131ff9b6b896450 (diff) | |
download | blackbird-op-linux-db2e8cc68f99b3c8f7fe01600ed62450dd7bd12e.tar.gz blackbird-op-linux-db2e8cc68f99b3c8f7fe01600ed62450dd7bd12e.zip |
scsi: ignore errors from scsi_dh_add_device()
device handler initialisation might fail due to a number of
reasons. But as device_handlers are optional this shouldn't
cause us to disable the device entirely.
So just ignore errors from scsi_dh_add_device().
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
-rw-r--r-- | drivers/scsi/scsi_sysfs.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index c8115b4fe474..750df9b9b11c 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c @@ -1058,11 +1058,12 @@ int scsi_sysfs_add_sdev(struct scsi_device *sdev) } error = scsi_dh_add_device(sdev); - if (error) { + 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); - return error; - } device_enable_async_suspend(&sdev->sdev_dev); error = device_add(&sdev->sdev_dev); |