提交 00da6a70 编写于 作者: H Hannes Reinecke 提交者: Martin K. Petersen

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.deReviewed-by: NBart Van Assche <bvanassche@acm.org>
Reviewed-by: NChristoph Hellwig <hch@lst.de>
Acked-by: NKai Mäkisara <kai.makisara@kolumbus.fi>
Signed-off-by: NHannes Reinecke <hare@suse.de>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 40d2fd05
......@@ -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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册