scsi: initio: Remove redundant assignment to pointer scb
authorColin Ian King <colin.i.king@gmail.com>
Fri, 5 Aug 2022 11:41:00 +0000 (12:41 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 1 Sep 2022 03:39:57 +0000 (23:39 -0400)
The variable scb is assigned a value but it is never read. The assignment
is redundant and can be removed. Also replace the != NULL check with the
more usual non-null check idiom.

Cleans up clang scan build warning:

drivers/scsi/initio.c:1169:9: warning: Although the value stored to 'scb'
is used in the enclosing expression, the value is never actually read
from 'scb' [deadcode.DeadStores]

Link: https://lore.kernel.org/r/20220805114100.2339637-1-colin.i.king@gmail.com
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/initio.c

index f585d6e..375261d 100644 (file)
@@ -1166,7 +1166,7 @@ static void tulip_scsi(struct initio_host * host)
                        return;
                }
                if (host->jsint & (TSS_FUNC_COMP | TSS_BUS_SERV)) {     /* func complete or Bus service */
-                       if ((scb = host->active) != NULL)
+                       if (host->active)
                                initio_next_state(host);
                        return;
                }