Re: [PATCH v3] usb: dwc2: dwc2_vbus_supply_init: fix error check

2018-03-23 Thread kbuild test robot
Hi Tomeu, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on balbi-usb/next] [also build test WARNING on next-20180323] [cannot apply to v4.16-rc6] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH v3] usb: dwc2: dwc2_vbus_supply_init: fix error check

2018-03-22 Thread Tomeu Vizoso
On 03/22/2018 02:26 PM, Heiko Stübner wrote: Am Donnerstag, 22. März 2018, 14:14:51 CET schrieb Tomeu Vizoso: devm_regulator_get_optional returns -ENODEV if the regulator isn't there, so if that's the case we have to make sure not to leave -ENODEV in the regulator pointer. Also, make sure we

Re: [PATCH v3] usb: dwc2: dwc2_vbus_supply_init: fix error check

2018-03-22 Thread Heiko Stübner
Am Donnerstag, 22. März 2018, 14:14:51 CET schrieb Tomeu Vizoso: > devm_regulator_get_optional returns -ENODEV if the regulator isn't > there, so if that's the case we have to make sure not to leave -ENODEV > in the regulator pointer. > > Also, make sure we return 0 in that case, but correctly

[PATCH v3] usb: dwc2: dwc2_vbus_supply_init: fix error check

2018-03-22 Thread Tomeu Vizoso
devm_regulator_get_optional returns -ENODEV if the regulator isn't there, so if that's the case we have to make sure not to leave -ENODEV in the regulator pointer. Also, make sure we return 0 in that case, but correctly propagate any other errors. Also propagate the error from _dwc2_hcd_start.