projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
usb: phy: mxs: suspend to RAM causes NULL pointer dereference
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
usb
/
phy
/
phy-mxs-usb.c
diff --git
a/drivers/usb/phy/phy-mxs-usb.c
b/drivers/usb/phy/phy-mxs-usb.c
index 8f7cb068d29bab1eb1f9641e41cbe4da30e22489..3fcc0483a0811e8f7e2984aea1c4a11ce2da0951 100644
(file)
--- a/
drivers/usb/phy/phy-mxs-usb.c
+++ b/
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,