summaryrefslogtreecommitdiff
path: root/drivers/scsi/st.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2021-04-27 11:30:07 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2021-06-01 05:48:20 +0300
commit00da6a701a69b685ee7cac95b5c276e2d011dbca (patch)
tree3fca0d6d386446614bc99dba6c179f02e52bd499 /drivers/scsi/st.c
parent40d2fd05ecc2b63d1bd8f6686f09941afe85edfe (diff)
downloadlinux-00da6a701a69b685ee7cac95b5c276e2d011dbca.tar.xz
scsi: st: Return error code in st_scsi_execute()
The callers to st_scsi_execute() already check for negative return values, so we can drop the use of DRIVER_ERROR and return the actual error code. Link: https://lore.kernel.org/r/20210427083046.31620-2-hare@suse.de Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Kai Mäkisara <kai.makisara@kolumbus.fi> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/st.c')
-rw-r--r--drivers/scsi/st.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 3b1afe1d5b27..5d840bc69639 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -551,7 +551,7 @@ static int st_scsi_execute(struct st_request *SRpnt, const unsigned char *cmd,
data_direction == DMA_TO_DEVICE ?
REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0);
if (IS_ERR(req))
- return DRIVER_ERROR << 24;
+ return PTR_ERR(req);
rq = scsi_req(req);
req->rq_flags |= RQF_QUIET;
@@ -562,7 +562,7 @@ static int st_scsi_execute(struct st_request *SRpnt, const unsigned char *cmd,
GFP_KERNEL);
if (err) {
blk_put_request(req);
- return DRIVER_ERROR << 24;
+ return err;
}
}