summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2026-03-04 23:42:21 +0300
committerArnd Bergmann <arnd@arndb.de>2026-03-04 23:42:22 +0300
commit22e6afddb5f92955006564fbba199f82d3972ae4 (patch)
treed8731827b8a968e861b9a1933378d152411b8cd1
parent4bc732b00a9f1f31f130e2dc3668e2760f2e961b (diff)
parente0cf84109bc6c6768337123f1de24ff56b41c91b (diff)
downloadlinux-22e6afddb5f92955006564fbba199f82d3972ae4.tar.xz
Merge tag 'reset-fixes-for-v7.0' of https://git.pengutronix.de/git/pza/linux into arm/fixes
Reset controller fixes for v7.0 * Fix NULL pointer dereference in reset-rzg2l-usbphy-ctrl driver for renesas,rzg2l-usbphy-ctrl devices without pwrrdy control. * tag 'reset-fixes-for-v7.0' of https://git.pengutronix.de/git/pza/linux: reset: rzg2l-usbphy-ctrl: Check pwrrdy is valid before using it Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--drivers/reset/reset-rzg2l-usbphy-ctrl.c3
1 files changed, 3 insertions, 0 deletions
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);
}