Skip to contentSkip to conversation

scsi: aic7xxx: fix error code handling

PATCH Applied Tong Zhang 2 participants 2 messages Aug 16, 2020 – Aug 31, 2020

Subsystems (2)
lore
Share & tools
lore

Tong Zhang

author
#0 lore raw

PATCH 1/1 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

---
 drivers/scsi/aic7xxx/aic7xxx_osm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/aic7xxx/aic7xxx_osm.c +2 -2
index e7ccb8b80fc1..7bba961d1ae0 100644
@@ -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);
 }
Signature · 1 line
2.25.1
#1 lore raw
Quoted 2 lines · Tong Zhang

ahc_linux_queue_recovery_cmd returns SUCCESS(0x2002) or FAIL(0x2003), but the caller is checking error case using !=0

Applied to 5.10/scsi-queue, thanks!

[1/1] scsi: aic7xxx: Fix error code handling

      https://git.kernel.org/mkp/scsi/c/715f43c66c45
Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering