Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 710105fd authored by Hannes Reinecke's avatar Hannes Reinecke Committed by James Bottomley
Browse files

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: default avatarBart van Assche <bart.vanassche@sandisk.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarJames Bottomley <JBottomley@Odin.com>
parent d4422774
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;