Hi Bin,

On 09.03.2016 02:57, Vladimir Zapolskiy wrote:
> The usb_get_phy() function returns either a valid pointer to phy or
> ERR_PTR() error, check for NULL always fails and may lead to oops on
> error path, fix this issue.
> 
> Signed-off-by: Vladimir Zapolskiy <[email protected]>
> ---
>  drivers/usb/musb/jz4740.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/musb/jz4740.c b/drivers/usb/musb/jz4740.c
> index 5e5a8fa..bc88899 100644
> --- a/drivers/usb/musb/jz4740.c
> +++ b/drivers/usb/musb/jz4740.c
> @@ -83,9 +83,9 @@ static int jz4740_musb_init(struct musb *musb)
>  {
>       usb_phy_generic_register();
>       musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2);
> -     if (!musb->xceiv) {
> +     if (IS_ERR(musb->xceiv)) {
>               pr_err("HS UDC: no transceiver configured\n");
> -             return -ENODEV;
> +             return PTR_ERR(musb->xceiv);
>       }
>  
>       /* Silicon does not implement ConfigData register.
> 

congratulations with new responsibilities regarding MUSB maintenance,
please could you check the status of this change?

Thank you in advance.

--
With best wishes,
Vladimir
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to