]> git.baikalelectronics.ru Git - kernel.git/commit
phy: sun4i: check PMU presence when poking unknown bit of pmu
authorIcenowy Zheng <icenowy@aosc.xyz>
Fri, 28 Oct 2016 16:27:01 +0000 (00:27 +0800)
committerKishon Vijay Abraham I <kishon@ti.com>
Sat, 5 Nov 2016 08:15:02 +0000 (13:45 +0530)
commitcf3a3e566819b90b2f1f9f9b5bd473b8313b86fa
tree0ee4d75e4ca929aa749e7a216702576a4cebccbe
parentd06644c40045f2f302b8ea2df02f61214b3566db
phy: sun4i: check PMU presence when poking unknown bit of pmu

Allwinner SoC's PHY 0, when used as OTG controller, have no pmu part.
The code that poke some unknown bit of PMU for H3/A64 didn't check
the PHY, and will cause kernel oops when PHY 0 is used.

This patch will check whether the pmu is not NULL before poking.

Fixes: 77c6e1bb9ab1 (phy: sun4i: add support for A64 usb phy)
Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/phy-sun4i-usb.c