summaryrefslogtreecommitdiff
path: root/drivers/scsi/cxlflash
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2021-04-27 11:30:12 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2021-06-01 05:48:21 +0300
commitced202f7bd78eb6a79c441a8b217e0f3d38bccfc (patch)
treea1f7fc246edf2ab038685b64540ce53392b145a6 /drivers/scsi/cxlflash
parent7e26e3ea028740f934477ec01ba586ab033c35aa (diff)
downloadlinux-ced202f7bd78eb6a79c441a8b217e0f3d38bccfc.tar.xz
scsi: core: Stop using DRIVER_ERROR
Return the actual error code in __scsi_execute() (which, according to the documentation, should have happened anyway). And audit all callers to cope with negative return values from __scsi_execute() and friends. [mkp: resolve conflict and return bool] Link: https://lore.kernel.org/r/20210427083046.31620-7-hare@suse.de Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/cxlflash')
-rw-r--r--drivers/scsi/cxlflash/superpipe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/cxlflash/superpipe.c b/drivers/scsi/cxlflash/superpipe.c
index ee11ec340654..caa7c5fd233d 100644
--- a/drivers/scsi/cxlflash/superpipe.c
+++ b/drivers/scsi/cxlflash/superpipe.c
@@ -369,7 +369,7 @@ retry:
goto out;
}
- if (driver_byte(result) == DRIVER_SENSE) {
+ if (result > 0 && driver_byte(result) == DRIVER_SENSE) {
result &= ~(0xFF<<24); /* DRIVER_SENSE is not an error */
if (result & SAM_STAT_CHECK_CONDITION) {
switch (sshdr.sense_key) {