From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Dan Carpenter <error27@gmail.com>
Cc: Helge Deller <deller@gmx.de>, Cai Huoqing <cai.huoqing@linux.dev>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] video: fbdev: mmp: Fix deferred clk handling in mmphw_probe()
Date: Wed, 19 Apr 2023 07:28:07 +0200 [thread overview]
Message-ID: <5f749397-d701-a83c-757b-cad38f74735f@wanadoo.fr> (raw)
In-Reply-To: <a7c75eb0-857c-4755-aa23-0a4a96a6d2ca@kili.mountain>
Le 19/04/2023 à 06:59, Dan Carpenter a écrit :
> On Sat, Apr 15, 2023 at 04:09:03PM +0300, Dan Carpenter wrote:
>> On Thu, Apr 13, 2023 at 09:33:17PM +0200, Christophe JAILLET wrote:
>>> When dev_err_probe() is called, 'ret' holds the value of the previous
>>> successful devm_request_irq() call.
>>> 'ret' should be assigned with a meaningful value before being used in
>>> dev_err_probe().
>>>
>>> While at it, use and return "PTR_ERR(ctrl->clk)" instead of a hard-coded
>>> "-ENOENT" so that -EPROBE_DEFER is handled and propagated correctly.
>>>
>>> Fixes: 81b63420564d ("video: fbdev: mmp: Make use of the helper function dev_err_probe()")
>>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>>> ---
>>
>> Presumably you already wrote a Coccinelle script for this but I've added
>> it to Smatch as well.
No I haven't.
I've spotted it while looking at some devm_clk_get_optional() candidate
with grep.
git grep -A5 devm_clk_get | grep -B5 ENOENT
Not perfect, but sometimes this kind of approach can find interesting
things coccinelle would miss.
As an example, the bitmap_alloc patch on sh4 was found this way, with grep.
So nice to have it in smatch, ;-)
CJ
>
> Here is this warning:
> drivers/video/fbdev/mmp/hw/mmp_ctrl.c:518 mmphw_probe() warn: passing zero to 'dev_err_probe'
>
> Other warnings. All five are interesting.
> drivers/power/supply/rt9467-charger.c:1026 rt9467_request_interrupt() warn: passing zero to 'dev_err_probe'
> drivers/pci/controller/dwc/pcie-bt1.c:601 bt1_pcie_add_port() warn: passing zero to 'dev_err_probe'
> drivers/spi/spi-sprd-adi.c:570 sprd_adi_probe() warn: passing zero to 'dev_err_probe'
> drivers/soc/qcom/icc-bwmon.c:776 bwmon_probe() warn: passing zero to 'dev_err_probe'
> drivers/soc/qcom/icc-bwmon.c:781 bwmon_probe() warn: passing zero to 'dev_err_probe'
>
> regards,
> dan carpenter
>
>
next prev parent reply other threads:[~2023-04-19 5:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-13 19:33 [PATCH] video: fbdev: mmp: Fix deferred clk handling in mmphw_probe() Christophe JAILLET
2023-04-15 13:09 ` Dan Carpenter
2023-04-19 4:59 ` Dan Carpenter
2023-04-19 5:28 ` Christophe JAILLET [this message]
2023-04-22 9:41 ` Helge Deller
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=5f749397-d701-a83c-757b-cad38f74735f@wanadoo.fr \
--to=christophe.jaillet@wanadoo.fr \
--cc=cai.huoqing@linux.dev \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=error27@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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