mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
scsi: fnic: Fix invalid comparison for error
The current comparison err != ERR_ECMDUNKNOWN is useless because err < 0 and ERR_ECMDUNKNOWN == 5. The logic is that if the CMD_CAPABILITY command was executed, there is no need to respond to unknown errors. Therefore, the sign of the number in the comparison must be changed. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Roman Demidov <roman.demidov.nn@gmail.com> Reviewed-by: Karan Tilak Kumar <kartilak@cisco.com> Link: https://patch.msgid.link/20260807091852.13151-1-roman.demidov.nn@gmail.com Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
This commit is contained in:
parent
626147717b
commit
15b7fe6db6
|
|
@ -381,7 +381,7 @@ static int vnic_dev_cmd2(struct vnic_dev *vdev, enum vnic_devcmd_cmd cmd,
|
|||
if (result->color == color) {
|
||||
if (result->error) {
|
||||
err = -(int) result->error;
|
||||
if (err != ERR_ECMDUNKNOWN ||
|
||||
if (err != -ERR_ECMDUNKNOWN ||
|
||||
cmd != CMD_CAPABILITY)
|
||||
pr_err("%s:Error %d devcmd %d\n",
|
||||
pci_name(vdev->pdev),
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user