Unverified Commit 22e6afdd authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

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: default avatarArnd Bergmann <arnd@arndb.de>
parents 4bc732b0 e0cf8410
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);
}