Skip to content

Commit 8f9cedc

Browse files
committed
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fix from James Bottomley: "Our final fix before the 4.12 release (hopefully). It's an error leg again: the fix to not bug on empty DMA transfers is returning the wrong code and confusing the block layer" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: return correct blkprep status code in case scsi_init_io() fails.
2 parents 3d339d3 + ca855a5 commit 8f9cedc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/scsi/scsi_lib.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,10 +1061,10 @@ int scsi_init_io(struct scsi_cmnd *cmd)
10611061
struct scsi_device *sdev = cmd->device;
10621062
struct request *rq = cmd->request;
10631063
bool is_mq = (rq->mq_ctx != NULL);
1064-
int error;
1064+
int error = BLKPREP_KILL;
10651065

10661066
if (WARN_ON_ONCE(!blk_rq_nr_phys_segments(rq)))
1067-
return -EINVAL;
1067+
goto err_exit;
10681068

10691069
error = scsi_init_sgtable(rq, &cmd->sdb);
10701070
if (error)

0 commit comments

Comments
 (0)