diff options
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 9cf6a80fe297..ad3ea24f0885 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -1379,8 +1379,6 @@ static int scsi_prep_fn(struct request_queue *q, struct request *req) | |||
1379 | 1379 | ||
1380 | ret = scsi_setup_cmnd(sdev, req); | 1380 | ret = scsi_setup_cmnd(sdev, req); |
1381 | out: | 1381 | out: |
1382 | if (ret != BLKPREP_OK) | ||
1383 | cmd->flags &= ~SCMD_INITIALIZED; | ||
1384 | return scsi_prep_return(q, req, ret); | 1382 | return scsi_prep_return(q, req, ret); |
1385 | } | 1383 | } |
1386 | 1384 | ||
@@ -1900,7 +1898,6 @@ static int scsi_mq_prep_fn(struct request *req) | |||
1900 | struct scsi_device *sdev = req->q->queuedata; | 1898 | struct scsi_device *sdev = req->q->queuedata; |
1901 | struct Scsi_Host *shost = sdev->host; | 1899 | struct Scsi_Host *shost = sdev->host; |
1902 | struct scatterlist *sg; | 1900 | struct scatterlist *sg; |
1903 | int ret; | ||
1904 | 1901 | ||
1905 | scsi_init_command(sdev, cmd); | 1902 | scsi_init_command(sdev, cmd); |
1906 | 1903 | ||
@@ -1934,10 +1931,7 @@ static int scsi_mq_prep_fn(struct request *req) | |||
1934 | 1931 | ||
1935 | blk_mq_start_request(req); | 1932 | blk_mq_start_request(req); |
1936 | 1933 | ||
1937 | ret = scsi_setup_cmnd(sdev, req); | 1934 | return scsi_setup_cmnd(sdev, req); |
1938 | if (ret != BLK_STS_OK) | ||
1939 | cmd->flags &= ~SCMD_INITIALIZED; | ||
1940 | return ret; | ||
1941 | } | 1935 | } |
1942 | 1936 | ||
1943 | static void scsi_mq_done(struct scsi_cmnd *cmd) | 1937 | static void scsi_mq_done(struct scsi_cmnd *cmd) |