From: Philipp Zabel <p.zabel@pengutronix.de>
To: Claudiu <claudiu.beznea@tuxon.dev>, biju.das.jz@bp.renesas.com
Cc: linux-kernel@vger.kernel.org,
Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Subject: Re: [PATCH] reset: rzg2l-usbphy-ctrl: Check pwrrdy is valid before using it
Date: Mon, 23 Feb 2026 17:06:51 +0100 [thread overview]
Message-ID: <23f78ee620644c12d4e3912fd72de35dccf04373.camel@pengutronix.de> (raw)
In-Reply-To: <20260204133427.3762840-1-claudiu.beznea.uj@bp.renesas.com>
On Mi, 2026-02-04 at 15:34 +0200, Claudiu wrote:
> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>
> The pwrrdy regmap_filed is allocated in rzg2l_usbphy_ctrl_pwrrdy_init()
> only if the driver data is set to RZG2L_USBPHY_CTRL_PWRRDY. Check that
> pwrrdy is valid before using it to avoid "Unable to handle kernel NULL
> pointer dereference at virtual address" errors.
>
> Fixes: c5b7cd9adefc ("reset: rzg2l-usbphy-ctrl: Add suspend/resume support")
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> ---
> drivers/reset/reset-rzg2l-usbphy-ctrl.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/reset/reset-rzg2l-usbphy-ctrl.c b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
> index 32bc268c9149..05dd9b4a02df 100644
> --- a/drivers/reset/reset-rzg2l-usbphy-ctrl.c
> +++ b/drivers/reset/reset-rzg2l-usbphy-ctrl.c
> @@ -136,6 +136,9 @@ static int rzg2l_usbphy_ctrl_set_pwrrdy(struct regmap_field *pwrrdy,
> {
> u32 val = power_on ? 0 : 1;
>
> + if (!pwrrdy)
> + return 0;
> +
> /* The initialization path guarantees that the mask is 1 bit long. */
> return regmap_field_update_bits(pwrrdy, 1, val);
> }
Applied to reset/fixes, thanks!
[1/1] reset: rzg2l-usbphy-ctrl: Check pwrrdy is valid before using it
https://git.pengutronix.de/cgit/pza/linux/commit/?id=e0cf84109bc6
regards
Philipp
prev parent reply other threads:[~2026-02-23 16:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-04 13:34 Claudiu
2026-02-10 12:54 ` Claudiu Beznea
2026-02-18 9:04 ` Biju Das
2026-02-23 16:06 ` Philipp Zabel [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=23f78ee620644c12d4e3912fd72de35dccf04373.camel@pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=biju.das.jz@bp.renesas.com \
--cc=claudiu.beznea.uj@bp.renesas.com \
--cc=claudiu.beznea@tuxon.dev \
--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
all inboxes | Powered by JetHome®