From: Claudiu Beznea <claudiu.beznea@tuxon.dev>
To: Dan Carpenter <dan.carpenter@linaro.org>,
Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH next] reset: rzg2l-usbphy-ctrl: Fix a NULL vs IS_ERR() bug in probe
Date: Sat, 1 Nov 2025 16:57:33 +0200 [thread overview]
Message-ID: <5d306cb4-a383-4efd-a3ff-add07ef28e8b@tuxon.dev> (raw)
In-Reply-To: <aQYKqxD6qCQwFCye@stanley.mountain>
On 11/1/25 15:27, Dan Carpenter wrote:
> The devm_regmap_field_alloc() function never returns NULL, it returns
> error pointers. Update the error checking to match.
>
> Fixes: 58128aa88867 ("reset: rzg2l-usbphy-ctrl: Add support for USB PWRRDY")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> ---
> drivers/reset/reset-rzg2l-usbphy-ctrl.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/reset/reset-rzg2l-usbphy-ctrl.c b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
> index eea56687cd0a..4ecb9acb2641 100644
> --- a/drivers/reset/reset-rzg2l-usbphy-ctrl.c
> +++ b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
> @@ -158,8 +158,8 @@ static int rzg2l_usbphy_ctrl_pwrrdy_init(struct device *dev)
> field.msb = __fls(args[1]);
>
> pwrrdy = devm_regmap_field_alloc(dev, regmap, field);
> - if (!pwrrdy)
> - return -ENOMEM;
> + if (IS_ERR(pwrrdy))
> + return PTR_ERR(pwrrdy);
>
> rzg2l_usbphy_ctrl_set_pwrrdy(pwrrdy, true);
>
next prev parent reply other threads:[~2025-11-01 14:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-01 13:27 Dan Carpenter
2025-11-01 14:57 ` Claudiu Beznea [this message]
2025-11-06 10:44 ` Philipp Zabel
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=5d306cb4-a383-4efd-a3ff-add07ef28e8b@tuxon.dev \
--to=claudiu.beznea@tuxon.dev \
--cc=claudiu.beznea.uj@bp.renesas.com \
--cc=dan.carpenter@linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=p.zabel@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®