diff options
author | Hannes Reinecke <hare@suse.de> | 2015-08-27 08:17:02 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Odin.com> | 2015-08-28 16:14:58 -0400 |
commit | 710105fda7a7f350c9fb22e7f61f74c3dc0fe514 (patch) | |
tree | 17009dff39cb2ee29652ec71aa7e610da08cb4cc /drivers/scsi/scsi_dh.c | |
parent | d44227749500d8b88a1c079bc04f69187eaf8747 (diff) |
scsi_dh: return SCSI_DH_NOTCONN in scsi_dh_activate()
When calling scsi_dh_activate() we should be returning
SCSI_DH_NOTCONN if the device handler couldn't be attached.
Reviewed-by: Bart van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi/scsi_dh.c')
-rw-r--r-- | drivers/scsi/scsi_dh.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_dh.c b/drivers/scsi/scsi_dh.c index 9f6511da5023..edb044a7b56d 100644 --- a/drivers/scsi/scsi_dh.c +++ b/drivers/scsi/scsi_dh.c | |||
@@ -326,6 +326,7 @@ int scsi_dh_activate(struct request_queue *q, activate_complete fn, void *data) | |||
326 | 326 | ||
327 | if (!sdev->handler) | 327 | if (!sdev->handler) |
328 | goto out_fn; | 328 | goto out_fn; |
329 | err = SCSI_DH_NOTCONN; | ||
329 | if (sdev->sdev_state == SDEV_CANCEL || | 330 | if (sdev->sdev_state == SDEV_CANCEL || |
330 | sdev->sdev_state == SDEV_DEL) | 331 | sdev->sdev_state == SDEV_DEL) |
331 | goto out_fn; | 332 | goto out_fn; |