]> git.baikalelectronics.ru Git - kernel.git/commitdiff
scsi: mac53c94: Fix warning comparing pointer to 0
authorHaowen Bai <baihaowen@meizu.com>
Mon, 14 Mar 2022 07:58:31 +0000 (15:58 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 26 Apr 2022 03:23:05 +0000 (23:23 -0400)
Fix the following coccicheck warning:

drivers/scsi/mac53c94.c:237:12-13: WARNING comparing pointer to 0

Link: https://lore.kernel.org/r/1647244711-31575-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Haowen Bai <baihaowen@meizu.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/mac53c94.c

index 070ebe352f9eafefd9b556ab8882a03ec7e04eef..f75928f7773ec78231da663e1e89e39b412ecd51 100644 (file)
@@ -234,7 +234,7 @@ static void mac53c94_interrupt(int irq, void *dev_id)
                ++mac53c94_errors;
                writeb(CMD_NOP + CMD_DMA_MODE, &regs->command);
        }
-       if (cmd == 0) {
+       if (!cmd) {
                printk(KERN_DEBUG "53c94: interrupt with no command active?\n");
                return;
        }