summaryrefslogtreecommitdiff
path: root/drivers/scsi/aic7xxx
diff options
context:
space:
mode:
authorTong Zhang <ztong0001@gmail.com>2020-08-16 10:02:42 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2020-08-25 06:13:27 +0300
commit715f43c66c45381ba885279ed393890a117e1b45 (patch)
tree30014f3ae09444e0d8c7e9b9004ec0642cd5ee75 /drivers/scsi/aic7xxx
parenta9b83986fd6e4834f99f883bbb5b7cb5186f5f5d (diff)
downloadlinux-715f43c66c45381ba885279ed393890a117e1b45.tar.xz
scsi: aic7xxx: Fix error code handling
ahc_linux_queue_recovery_cmd returns SUCCESS(0x2002) or FAIL(0x2003), but the caller is checking error case using != 0. Link: https://lore.kernel.org/r/20200816070242.978839-1-ztong0001@gmail.com Signed-off-by: Tong Zhang <ztong0001@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/aic7xxx')
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c
index e7ccb8b80fc1..7bba961d1ae0 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c
@@ -730,7 +730,7 @@ ahc_linux_abort(struct scsi_cmnd *cmd)
int error;
error = ahc_linux_queue_recovery_cmd(cmd, SCB_ABORT);
- if (error != 0)
+ if (error != SUCCESS)
printk("aic7xxx_abort returns 0x%x\n", error);
return (error);
}
@@ -744,7 +744,7 @@ ahc_linux_dev_reset(struct scsi_cmnd *cmd)
int error;
error = ahc_linux_queue_recovery_cmd(cmd, SCB_DEVICE_RESET);
- if (error != 0)
+ if (error != SUCCESS)
printk("aic7xxx_dev_reset returns 0x%x\n", error);
return (error);
}