From: Hannes Reinecke Date: Thu, 27 Aug 2015 12:17:02 +0000 (+0200) Subject: scsi_dh: return SCSI_DH_NOTCONN in scsi_dh_activate() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=710105fda7a7f350c9fb22e7f61f74c3dc0fe514;p=openwrt%2Fstaging%2Fblogic.git 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 Reviewed-by: Christoph Hellwig Signed-off-by: Hannes Reinecke Signed-off-by: James Bottomley --- 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) if (!sdev->handler) goto out_fn; + err = SCSI_DH_NOTCONN; if (sdev->sdev_state == SDEV_CANCEL || sdev->sdev_state == SDEV_DEL) goto out_fn;