mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
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>
This commit is contained in:
parent
a9b83986fd
commit
715f43c66c
1 changed files with 2 additions and 2 deletions
|
@ -730,7 +730,7 @@ ahc_linux_abort(struct scsi_cmnd *cmd)
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
error = ahc_linux_queue_recovery_cmd(cmd, SCB_ABORT);
|
error = ahc_linux_queue_recovery_cmd(cmd, SCB_ABORT);
|
||||||
if (error != 0)
|
if (error != SUCCESS)
|
||||||
printk("aic7xxx_abort returns 0x%x\n", error);
|
printk("aic7xxx_abort returns 0x%x\n", error);
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
@ -744,7 +744,7 @@ ahc_linux_dev_reset(struct scsi_cmnd *cmd)
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
error = ahc_linux_queue_recovery_cmd(cmd, SCB_DEVICE_RESET);
|
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);
|
printk("aic7xxx_dev_reset returns 0x%x\n", error);
|
||||||
return (error);
|
return (error);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue