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

2018-03-22 Thread Amelie DELAUNAY
Hi Heiko, Hi Tomeu, On 03/22/2018 12:41 PM, Heiko Stübner wrote: > Hi Tomeu, > > Am Donnerstag, 22. März 2018, 12:39:13 CET schrieb Heiko Stübner: >> Am Donnerstag, 22. März 2018, 10:39:43 CET schrieb Tomeu Vizoso: >>> devm_regulator_get_optional returns -ENODEV if the regulator isn't >>> there,

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

2018-03-22 Thread Amelie DELAUNAY
Hi Heiko, Hi Tomeu, On 03/22/2018 12:41 PM, Heiko Stübner wrote: > Hi Tomeu, > > Am Donnerstag, 22. März 2018, 12:39:13 CET schrieb Heiko Stübner: >> Am Donnerstag, 22. März 2018, 10:39:43 CET schrieb Tomeu Vizoso: >>> devm_regulator_get_optional returns -ENODEV if the regulator isn't >>> there,

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

2018-03-22 Thread Heiko Stübner
Hi Tomeu, Am Donnerstag, 22. März 2018, 12:39:13 CET schrieb Heiko Stübner: > Am Donnerstag, 22. März 2018, 10:39:43 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

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

2018-03-22 Thread Heiko Stübner
Hi Tomeu, Am Donnerstag, 22. März 2018, 12:39:13 CET schrieb Heiko Stübner: > Am Donnerstag, 22. März 2018, 10:39:43 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

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

2018-03-22 Thread Heiko Stübner
Am Donnerstag, 22. März 2018, 10:39:43 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

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

2018-03-22 Thread Heiko Stübner
Am Donnerstag, 22. März 2018, 10:39:43 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] 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.

[PATCH] 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.