Re: [PATCH] usb: usb251xb: fix regulator probe and error handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 26, 2020 at 08:26:44AM +0100, Marco Felsch wrote:
> Commit 4d7201cda226 ("usb: usb251xb: add vdd supply support") didn't
> covered the non-DT use-case and so the regualtor_enable() call during
> probe will fail on those platforms. Also the commit didn't handled the
> error case correctly.
> 
> Move devm_regulator_get() out of usb251xb_get_ofdata() to address the
> 1st issue. This can be done without worries because devm_regulator_get()
> handles the non-DT use-case too. Add devm_add_action_or_reset() to
> address the 2nd bug.
> 
> Fixes: 4d7201cda226 ("usb: usb251xb: add vdd supply support")
> Signed-off-by: Marco Felsch <m.felsch@xxxxxxxxxxxxxx>
> ---

Looks fine to me.

Acked-by: Richard Leitner <richard.leitner@xxxxxxxxxxx>

> Hi,
> 
> unfortunately I didn't covered the non-DT use case during the devel of
> commit 4d7201cda226 and I was a bit to optimistic so I also missed the
> error handling.
> 
> Regards,
>   Marco
> 
>  drivers/usb/misc/usb251xb.c | 20 ++++++++++++++++----
>  1 file changed, 16 insertions(+), 4 deletions(-)

regards;rl



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux