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] [day] [month] [year] [list]
Date:   Sun, 6 Nov 2022 17:13:21 +0000
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        "wangkailong@...i.cn" <wangkailong@...i.cn>,
        "benh@...nel.crashing.org" <benh@...nel.crashing.org>,
        "mpe@...erman.id.au" <mpe@...erman.id.au>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "sohu0106@....com" <sohu0106@....com>
CC:     "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] macintosh/adb: Fix warning comparing pointer to 0



Le 06/11/2022 à 17:12, Christophe JAILLET a écrit :
> Le 06/11/2022 à 16:28, wangkailong@...i.cn a écrit :
>> Fix the following coccicheck warning:
>>
>> drivers/macintosh/adb.c:676:14-15: WARNING comparing pointer to 0.
>>
>> Signed-off-by: KaiLong Wang <wangkailong@...i.cn>

We already have such patches awaiting for application, see 
https://patchwork.ozlabs.org/project/linuxppc-dev/list/?submitter=83647

Please check patchwork before submitting such fixes as they may already 
exist.

Thanks
Christophe


>> ---
>>   drivers/macintosh/adb.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c
>> index 1bbb9ca08d40..076253599bd4 100644
>> --- a/drivers/macintosh/adb.c
>> +++ b/drivers/macintosh/adb.c
>> @@ -673,7 +673,7 @@ static int adb_open(struct inode *inode, struct 
>> file *file)
>>           goto out;
>>       }
>>       state = kmalloc(sizeof(struct adbdev_state), GFP_KERNEL);
>> -    if (state == 0) {
>> +    if (state) {
> 
> Hi
> no, this should be "if (!state)"
> 
> CJ
> 
>>           ret = -ENOMEM;
>>           goto out;
>>       }
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ