Skip to content

Commit 22e6afd

Browse files
committed
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>
2 parents 4bc732b + e0cf841 commit 22e6afd

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/reset/reset-rzg2l-usbphy-ctrl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ static int rzg2l_usbphy_ctrl_set_pwrrdy(struct regmap_field *pwrrdy,
136136
{
137137
u32 val = power_on ? 0 : 1;
138138

139+
if (!pwrrdy)
140+
return 0;
141+
139142
/* The initialization path guarantees that the mask is 1 bit long. */
140143
return regmap_field_update_bits(pwrrdy, 1, val);
141144
}

0 commit comments

Comments
 (0)