summaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi_lib.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2017-04-15 09:36:06 -0700
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2017-04-15 09:36:06 -0700
commitca855a5e2679e9e571dfb0e64f4484b36f1992a8 (patch)
tree327d76200422d7c308d44354b1eef49cc3c6ec6c /drivers/scsi/scsi_lib.c
parent0e1bfea999daa27c801b19617a6ef8b8ec4adc75 (diff)
parente7661a8e5ce10b5321882d0bbaf3f81070903319 (diff)
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)