diff options
author | Hannes Reinecke <hare@suse.de> | 2015-12-01 09:16:42 (GMT) |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2015-12-02 21:29:46 (GMT) |
commit | 221255aee67ec1c752001080aafec0c4e9390d95 (patch) | |
tree | f6bfe11bd7ed89e1c4ab05aa033b38b1e235d3f3 /drivers/scsi/scsi_sysfs.c | |
parent | 41f95dd2efd80a611c8566888fcdcb5d399ea474 (diff) | |
download | linux-221255aee67ec1c752001080aafec0c4e9390d95.tar.xz |
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>
Diffstat (limited to 'drivers/scsi/scsi_sysfs.c')
-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 fc3cd26..d015374 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c @@ -1120,11 +1120,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); |