LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: wangkailong@jari.cn
To: benh@kernel.crashing.org, christophe.leroy@csgroup.eu,
	 mpe@ellerman.id.au
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH] macintosh: Fix warning comparing pointer to 0
Date: Sun, 6 Nov 2022 23:18:35 +0800 (GMT+08:00)	[thread overview]
Message-ID: <c31207c.c3.1844d85a6aa.Coremail.wangkailong@jari.cn> (raw)

Fix the following coccicheck warning:

drivers/macintosh/macio-adb.c:103:13-14: WARNING comparing pointer to 0.

Signed-off-by: KaiLong Wang <wangkailong@jari.cn>
---
 drivers/macintosh/macio-adb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/macintosh/macio-adb.c b/drivers/macintosh/macio-adb.c
index 9b63bd2551c6..1c1c375a817d 100644
--- a/drivers/macintosh/macio-adb.c
+++ b/drivers/macintosh/macio-adb.c
@@ -100,7 +100,7 @@ int macio_init(void)
 	unsigned int irq;
 
 	adbs = of_find_compatible_node(NULL, "adb", "chrp,adb0");
-	if (adbs == 0)
+	if (adbs)
 		return -ENXIO;
 
 	if (of_address_to_resource(adbs, 0, &r)) {
-- 
2.25.1

             reply	other threads:[~2022-11-06 15:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-06 15:18 wangkailong [this message]
2022-11-06 16:08 ` [PATCH] macintosh: Fix warning comparing pointer to 0 Christophe JAILLET
2022-11-06 17:13   ` Christophe Leroy
  -- strict thread matches above, loose matches on Subject: below --
2022-02-14  1:05 Yang Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c31207c.c3.1844d85a6aa.Coremail.wangkailong@jari.cn \
    --to=wangkailong@jari.cn \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox