Message ID | c0711737fe54efa72d35df42cc4b9db31c382e7a.1625896955.git.Arthur.Petrosyan@synopsys.com |
---|---|
State | New |
Headers | show |
Series | [RFC] usb: phy: Fix handle page fault on usb_phy_uevent | expand |
diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c index 83ed5089475a..5046d4a07348 100644 --- a/drivers/usb/phy/phy.c +++ b/drivers/usb/phy/phy.c @@ -151,6 +151,9 @@ static int usb_phy_uevent(struct device *dev, struct kobj_uevent_env *env) char uchger_state[50] = { 0 }; char uchger_type[50] = { 0 }; + if (list_empty(&phy_list)) + return -ENODEV; + usb_phy = __device_to_usb_phy(dev); snprintf(uchger_state, ARRAY_SIZE(uchger_state),