lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 6 Nov 2022 17:08:31 +0100
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     wangkailong@...i.cn, benh@...nel.crashing.org,
        christophe.leroy@...roup.eu, mpe@...erman.id.au
Cc:     linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] macintosh: Fix warning comparing pointer to 0

Le 06/11/2022 à 16:18, wangkailong@...i.cn a écrit :
> Fix the following coccicheck warning:
> 
> drivers/macintosh/macio-adb.c:103:13-14: WARNING comparing pointer to 0.
> 
> Signed-off-by: KaiLong Wang <wangkailong@...i.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)

Hi
no, this should be "if (!adbs)"

CJ

>   		return -ENXIO;
>   
>   	if (of_address_to_resource(adbs, 0, &r)) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ