From 710105fda7a7f350c9fb22e7f61f74c3dc0fe514 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Thu, 27 Aug 2015 14:17:02 +0200 Subject: [PATCH] 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 --- drivers/scsi/scsi_dh.c | 1 + 1 file changed, 1 insertion(+) 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; -- 2.30.2