From patchwork Mon Mar 14 07:58:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: baihaowen X-Patchwork-Id: 12779846 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04D3AC433EF for ; Mon, 14 Mar 2022 08:10:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237598AbiCNILt (ORCPT ); Mon, 14 Mar 2022 04:11:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235426AbiCNILs (ORCPT ); Mon, 14 Mar 2022 04:11:48 -0400 X-Greylist: delayed 62 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 14 Mar 2022 01:10:38 PDT Received: from mail.meizu.com (edge05.meizu.com [157.122.146.251]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D39B2BE6; Mon, 14 Mar 2022 01:10:38 -0700 (PDT) Received: from IT-EXMB-1-125.meizu.com (172.16.1.125) by mz-mail12.meizu.com (172.16.1.108) with Microsoft SMTP Server (TLS) id 14.3.487.0; Mon, 14 Mar 2022 15:58:33 +0800 Received: from meizu.meizu.com (172.16.137.70) by IT-EXMB-1-125.meizu.com (172.16.1.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Mon, 14 Mar 2022 15:58:33 +0800 From: Haowen Bai To: , CC: , , Haowen Bai Subject: [PATCH] scsi: mac53c94: fix warning comparing pointer to 0 Date: Mon, 14 Mar 2022 15:58:31 +0800 Message-ID: <1647244711-31575-1-git-send-email-baihaowen@meizu.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [172.16.137.70] X-ClientProxiedBy: IT-EXMB-1-126.meizu.com (172.16.1.126) To IT-EXMB-1-125.meizu.com (172.16.1.125) Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fix the following coccicheck warning: drivers/scsi/mac53c94.c:237:12-13: WARNING comparing pointer to 0 Signed-off-by: Haowen Bai --- 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, ®s->command); } - if (cmd == 0) { + if (!cmd) { printk(KERN_DEBUG "53c94: interrupt with no command active?\n"); return; }