[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1647484837-14352-1-git-send-email-baihaowen@meizu.com>
Date: Thu, 17 Mar 2022 10:40:37 +0800
From: Haowen Bai <baihaowen@...zu.com>
To: <benh@...nel.crashing.org>, <masahiroy@...nel.org>,
<adobriyan@...il.com>
CC: <linuxppc-dev@...ts.ozlabs.org>, <linux-kernel@...r.kernel.org>,
"Haowen Bai" <baihaowen@...zu.com>
Subject: [PATCH] macintosh: via-cuda: Fix warning comparing pointer to 0
Avoid pointer type value compared with 0 to make code clear.
Signed-off-by: Haowen Bai <baihaowen@...zu.com>
---
drivers/macintosh/via-cuda.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/macintosh/via-cuda.c b/drivers/macintosh/via-cuda.c
index cd267392..05a3cd9 100644
--- a/drivers/macintosh/via-cuda.c
+++ b/drivers/macintosh/via-cuda.c
@@ -236,10 +236,10 @@ int __init find_via_cuda(void)
const u32 *reg;
int err;
- if (vias != 0)
+ if (vias)
return 1;
vias = of_find_node_by_name(NULL, "via-cuda");
- if (vias == 0)
+ if (!vias)
return 0;
reg = of_get_property(vias, "reg", NULL);
@@ -517,7 +517,7 @@ cuda_write(struct adb_request *req)
req->reply_len = 0;
spin_lock_irqsave(&cuda_lock, flags);
- if (current_req != 0) {
+ if (current_req) {
last_req->next = req;
last_req = req;
} else {
--
2.7.4
Powered by blists - more mailing lists