mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
macintosh: Fix warning comparing pointer to 0
Fix the following coccicheck warnings: ./drivers/macintosh/via-cuda.c:240:16-17: WARNING comparing pointer to 0 ./drivers/macintosh/via-cuda.c:243:16-17: WARNING comparing pointer to 0, suggest !E ./drivers/macintosh/via-cuda.c:521:23-24: WARNING comparing pointer to 0 Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220214010558.130201-1-yang.lee@linux.alibaba.com
This commit is contained in:
parent
2077631917
commit
928b39645e
1 changed files with 3 additions and 3 deletions
|
|
@ -237,10 +237,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);
|
||||
|
|
@ -518,7 +518,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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue