diff mbox series

[next] scsi: megaraid: remove redundant assignment to variable retval

Message ID 20240118121441.2533620-1-colin.i.king@gmail.com
State New
Headers show
Series [next] scsi: megaraid: remove redundant assignment to variable retval | expand

Commit Message

Colin Ian King Jan. 18, 2024, 12:14 p.m. UTC
The variable retval is being assigned a value that is not being
read afterwards. The assignment is redundant and can be removed.

Cleans up clang scan warning:
Although the value stored to 'retval' is used in the enclosing
expression, the value is never actually read from 'retval'
[deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/scsi/megaraid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin K. Petersen Jan. 24, 2024, 2:38 a.m. UTC | #1
Colin,

> The variable retval is being assigned a value that is not being read
> afterwards. The assignment is redundant and can be removed.

Applied to 6.9/scsi-staging, thanks!
Martin K. Petersen Jan. 30, 2024, 2:26 a.m. UTC | #2
On Thu, 18 Jan 2024 12:14:41 +0000, Colin Ian King wrote:

> The variable retval is being assigned a value that is not being
> read afterwards. The assignment is redundant and can be removed.
> 
> Cleans up clang scan warning:
> Although the value stored to 'retval' is used in the enclosing
> expression, the value is never actually read from 'retval'
> [deadcode.DeadStores]
> 
> [...]

Applied to 6.9/scsi-queue, thanks!

[1/1] scsi: megaraid: remove redundant assignment to variable retval
      https://git.kernel.org/mkp/scsi/c/9759cdc1bcb8
diff mbox series

Patch

diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 66a30a3e6cd5..38976f94453e 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -219,7 +219,7 @@  mega_query_adapter(adapter_t *adapter)
 	raw_mbox[3] = ENQ3_GET_SOLICITED_FULL;	/* i.e. 0x02 */
 
 	/* Issue a blocking command to the card */
-	if ((retval = issue_scb_block(adapter, raw_mbox))) {
+	if (issue_scb_block(adapter, raw_mbox)) {
 		/* the adapter does not support 40ld */
 
 		mraid_ext_inquiry	*ext_inq;