[PATCH] macintosh: Fix warning comparing pointer to 0
wangkailong at jari.cn
wangkailong at jari.cn
Mon Nov 7 02:18:35 AEDT 2022
Fix the following coccicheck warning:
drivers/macintosh/macio-adb.c:103:13-14: WARNING comparing pointer to 0.
Signed-off-by: KaiLong Wang <wangkailong at 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
More information about the Linuxppc-dev
mailing list