summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/usb/phy/phy-mxs-usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/usb/phy/phy-mxs-usb.c')
-rw-r--r--kernel/drivers/usb/phy/phy-mxs-usb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/drivers/usb/phy/phy-mxs-usb.c b/kernel/drivers/usb/phy/phy-mxs-usb.c
index 8f7cb068d..3fcc0483a 100644
--- a/kernel/drivers/usb/phy/phy-mxs-usb.c
+++ b/kernel/drivers/usb/phy/phy-mxs-usb.c
@@ -217,6 +217,9 @@ static bool mxs_phy_get_vbus_status(struct mxs_phy *mxs_phy)
{
unsigned int vbus_value;
+ if (!mxs_phy->regmap_anatop)
+ return false;
+
if (mxs_phy->port_id == 0)
regmap_read(mxs_phy->regmap_anatop,
ANADIG_USB1_VBUS_DET_STAT,