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:   Mon, 1 Aug 2022 10:43:59 +0800
From:   Yang Yingliang <yangyingliang@...wei.com>
To:     Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
CC:     <linux-kernel@...r.kernel.org>, <linux-fbdev@...r.kernel.org>,
        <deller@....de>
Subject: Re: [PATCH -next] video: fbdev: imxfb: fix return value check in
 imxfb_probe()

Hi,

On 2022/7/31 7:18, Uwe Kleine-König wrote:
> Hello,
>
> On Fri, Jul 29, 2022 at 10:41:34AM +0800, Yang Yingliang wrote:
>> If devm_ioremap_resource() fails, it never return NULL, replace
>> NULL test with IS_ERR().
> Oh, thanks for cleanup up behind me. Did you find this using some static
> analysis tool? I would consider it interesting and fair to mention this
> in the commit log.
I found it by coccicheck like this:

@@
expression ret, E;
@@
ret = \(devm_ioremap_resource\)(...);
... when != ret = E
     when != IS_ERR(ret)
(
  ret == NULL || IS_ERR(ret)
|
  IS_ERR(ret) || ret == NULL
|
  ret != NULL && !IS_ERR(ret)
|
  !IS_ERR(ret) && ret != NULL
|
- ret == NULL
+ IS_ERR(ret)
|
- ret != NULL
+ !IS_ERR(ret)
)

Thanks,
Yang
>
> Best regards
> Uwe
>
>

Powered by blists - more mailing lists