Commit 221255ae authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Martin K. Petersen

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: default avatarJohannes Thumshirn <jthumshirn@suse.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 41f95dd2
...@@ -1120,11 +1120,12 @@ int scsi_sysfs_add_sdev(struct scsi_device *sdev) ...@@ -1120,11 +1120,12 @@ int scsi_sysfs_add_sdev(struct scsi_device *sdev)
} }
error = scsi_dh_add_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, sdev_printk(KERN_INFO, sdev,
"failed to add device handler: %d\n", error); "failed to add device handler: %d\n", 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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment