scsi: bnx2fc: Remove meaningless 'bnx2fc_abts_cleanup()' return value assignment
Subsystems (2)
PATCH 1/1 scsi: bnx2fc: Remove meaningless 'bnx2fc_abts_cleanup()' return value assignment
From: SeongJae Park <[email protected]>
Commit 122c81c563b0 ("scsi: bnx2fc: Return failure if io_req is already in ABTS processing") made 'bnx2fc_eh_abort()' to return 'FAILED' when 'io_req' is alrady in ABTS processing, regardless of the return value of 'bnx2fc_abts_cleanup()'. But, it left the assignment of the return value of 'bnx2fc_abts_cleanup()' to 'rc', which is meaningless now. This commit removes it.
This issue was discovered and resolved using Coverity Static Analysis Security Testing (SAST) by Synopsys, Inc.
--- drivers/scsi/bnx2fc/bnx2fc_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/bnx2fc/bnx2fc_io.c +1 -1
@@ -1213,7 +1213,7 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)* cleanup the command and return that I/O was successfully * aborted. */ - rc =bnx2fc_abts_cleanup (io_req); +bnx2fc_abts_cleanup (io_req);/* This only occurs when an task abort was requested while ABTS is in progress. Setting the IO_CLEANUP flag will skip the RRQ process in the case when the fw generated SCSI_CMD cmpl
Signature · 1 line
2.17.1
Hi SeongJae,
Quoted 48 lines
-----Original Message-----
From: SeongJae Park <[email protected]>
Sent: Friday, June 18, 2021 10:15 PM
To: Saurav Kashyap <[email protected]>
Cc: Javed Hasan <[email protected]>; GR-QLogic-Storage-Upstream <GR- [email protected]>; [email protected]; [email protected]; [email protected]; linux- [email protected]; [email protected]; SeongJae Park <[email protected]>
Subject: [EXT] [PATCH] scsi: bnx2fc: Remove meaningless 'bnx2fc_abts_cleanup()' return value assignmentExternal Email
----------------------------------------------------------------------
From: SeongJae Park <[email protected]>Commit
122c81c563b0("scsi: bnx2fc: Return failure ifio_reqis already in ABTS processing") made 'bnx2fc_eh_abort()' to return 'FAILED' when 'io_req' is alrady in ABTS processing, regardless of the return value of 'bnx2fc_abts_cleanup()'. But, it left the assignment of the return value of 'bnx2fc_abts_cleanup()' to 'rc', which is meaningless now. This commit removes it.This issue was discovered and resolved using Coverity Static Analysis Security Testing (SAST) by Synopsys, Inc.
Fixes 122c81c563b0 ("scsi: bnx2fc: Return failure if io_req is already in ABTSprocessing")
Signed-off-by SeongJae Park <[email protected]>--- drivers/scsi/bnx2fc/bnx2fc_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/scsi/bnx2fc/bnx2fc_io.c +1
-1@@ -1213,7 +1213,7 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)* cleanup the command and return that I/O was successfully * aborted. */ - rc =bnx2fc_abts_cleanup (io_req); +bnx2fc_abts_cleanup (io_req);/* This only occurs when an task abort was requested while ABTS
drivers/scsi/bnx2fc/bnx2fc_io.c +0
-0is in progress. Setting the IO_CLEANUP flag will skip the RRQ process in the case when the fw generated SCSI_CMD
Quoted 1 line
cmpl
Thanks,
~Saurav
Quoted 2 lines
--
2.17.1
Martin K. Petersen
AppliedSeongJae,
Quoted 6 lines
Commit
122c81c563b0("scsi: bnx2fc: Return failure ifio_reqis already in ABTS processing") made 'bnx2fc_eh_abort()' to return 'FAILED' when 'io_req' is alrady in ABTS processing, regardless of the return value of 'bnx2fc_abts_cleanup()'. But, it left the assignment of the return value of 'bnx2fc_abts_cleanup()' to 'rc', which is meaningless now. This commit removes it.
Applied to 5.14/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Martin K. Petersen
AppliedQuoted 8 lines · SeongJae Park
Commit
122c81c563b0("scsi: bnx2fc: Return failure ifio_reqis already in ABTS processing") made 'bnx2fc_eh_abort()' to return 'FAILED' when 'io_req' is alrady in ABTS processing, regardless of the return value of 'bnx2fc_abts_cleanup()'. But, it left the assignment of the return value of 'bnx2fc_abts_cleanup()' to 'rc', which is meaningless now. This commit removes it.[...]
Applied to 5.14/scsi-queue, thanks!
[1/1] scsi: bnx2fc: Remove meaningless 'bnx2fc_abts_cleanup()' return value assignment
https://git.kernel.org/mkp/scsi/c/73b306a2bcb7
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering