summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_lib.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2017-04-15 18:36:06 +0200
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2017-04-15 18:36:06 +0200
commitca855a5e2679e9e571dfb0e64f4484b36f1992a8 (patch)
tree327d76200422d7c308d44354b1eef49cc3c6ec6c /drivers/scsi/scsi_lib.c
parentMerge remote-tracking branch 'mkp-scsi/4.11/scsi-fixes' into fixes (diff)
parentscsi: return correct blkprep status code in case scsi_init_io() fails. (diff)
downloadlinux-ca855a5e2679e9e571dfb0e64f4484b36f1992a8.tar.xz
linux-ca855a5e2679e9e571dfb0e64f4484b36f1992a8.zip
Merge remote-tracking branch 'mkp-scsi/4.11/scsi-fixes' into fixes
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r--drivers/scsi/scsi_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 19125d72f322..5558e212368b 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1061,10 +1061,10 @@ int scsi_init_io(struct scsi_cmnd *cmd)
struct scsi_device *sdev = cmd->device;
struct request *rq = cmd->request;
bool is_mq = (rq->mq_ctx != NULL);
- int error;
+ int error = BLKPREP_KILL;
if (WARN_ON_ONCE(!blk_rq_nr_phys_segments(rq)))
- return -EINVAL;
+ goto err_exit;
error = scsi_init_sgtable(rq, &cmd->sdb);
if (error)