From: Yang Yingliang <yangyingliang@huawei.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: <linux-kernel@vger.kernel.org>, <linux-fbdev@vger.kernel.org>,
<deller@gmx.de>
Subject: Re: [PATCH -next] video: fbdev: imxfb: fix return value check in imxfb_probe()
Date: Mon, 1 Aug 2022 10:43:59 +0800 [thread overview]
Message-ID: <b1487b74-cbc1-013b-f734-c78319d76894@huawei.com> (raw)
In-Reply-To: <20220730231815.dzuscf2x2sgj66bg@pengutronix.de>
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
>
>
prev parent reply other threads:[~2022-08-01 2:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-29 2:41 Yang Yingliang
2022-07-29 20:59 ` Helge Deller
2022-07-30 23:18 ` Uwe Kleine-König
2022-08-01 2:43 ` Yang Yingliang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b1487b74-cbc1-013b-f734-c78319d76894@huawei.com \
--to=yangyingliang@huawei.com \
--cc=deller@gmx.de \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®