usb_phy_set_power() will check and return error Cc: Peter Chen <peter.chen@xxxxxxxxxxxxx> Signed-off-by: Mian Yousaf Kaukab <yousaf.kaukab@xxxxxxxxx> --- drivers/usb/chipidea/udc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 764f668..07d2e60 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -1549,9 +1549,7 @@ static int ci_udc_vbus_draw(struct usb_gadget *_gadget, unsigned ma) { struct ci_hdrc *ci = container_of(_gadget, struct ci_hdrc, gadget); - if (ci->usb_phy) - return usb_phy_set_power(ci->usb_phy, ma); - return -ENOTSUPP; + return usb_phy_set_power(ci->usb_phy, ma); } static int ci_udc_selfpowered(struct usb_gadget *_gadget, int is_on) -- 2.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html