[PATCH] scsi: mac53c94: fix warning comparing pointer to 0

Haowen Bai posted 1 patch 4 years, 3 months ago
drivers/scsi/mac53c94.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] scsi: mac53c94: fix warning comparing pointer to 0
Posted by Haowen Bai 4 years, 3 months ago
Fix the following coccicheck warning:
drivers/scsi/mac53c94.c:237:12-13: WARNING comparing pointer to 0

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
 drivers/scsi/mac53c94.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/mac53c94.c b/drivers/scsi/mac53c94.c
index 3976a18..a087f82 100644
--- a/drivers/scsi/mac53c94.c
+++ b/drivers/scsi/mac53c94.c
@@ -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;
 	}
-- 
2.7.4
Re: [PATCH] scsi: mac53c94: fix warning comparing pointer to 0
Posted by Martin K. Petersen 4 years, 1 month ago
On Mon, 14 Mar 2022 15:58:31 +0800, Haowen Bai wrote:

> Fix the following coccicheck warning:
> drivers/scsi/mac53c94.c:237:12-13: WARNING comparing pointer to 0
> 
> 

Applied to 5.19/scsi-queue, thanks!

[1/1] scsi: mac53c94: fix warning comparing pointer to 0
      https://git.kernel.org/mkp/scsi/c/93de8df20537

-- 
Martin K. Petersen	Oracle Linux Engineering