On Fri, Nov 14, 2014 at 04:33:22PM +0200, Andy Shevchenko wrote:
> Since PHY for Chipidea is optional (not all SoCs having PHY for Chipidea 
> should
> be programmed), we register 'nop' PHY for platforms that does not have

s/does not/do not/

> @@ -73,20 +83,27 @@ static int ci_hdrc_pci_probe(struct pci_dev *pdev,
>       pci_set_master(pdev);
>       pci_try_set_mwi(pdev);
>  
> +     /* register a nop PHY */
> +     ci->phy = usb_phy_generic_register();
> +     if (!ci->phy)
> +             return -ENOMEM;
> +
>       memset(res, 0, sizeof(res));
> +
>       res[0].start    = pci_resource_start(pdev, 0);
>       res[0].end      = pci_resource_end(pdev, 0);
>       res[0].flags    = IORESOURCE_MEM;
>       res[1].start    = pdev->irq;
>       res[1].flags    = IORESOURCE_IRQ;
>  
> -     plat_ci = ci_hdrc_add_device(&pdev->dev, res, nres, platdata);
> -     if (IS_ERR(plat_ci)) {
> +     ci->ci = ci_hdrc_add_device(&pdev->dev, res, nres, platdata);
> +     if (IS_ERR(ci->ci)) {
>               dev_err(&pdev->dev, "ci_hdrc_add_device failed!\n");
> -             return PTR_ERR(plat_ci);
> +             usb_phy_generic_unregister(ci->phy);
> +             return PTR_ERR(ci->ci);
>       }
>  
> -     pci_set_drvdata(pdev, plat_ci);
> +     pci_set_drvdata(pdev, ci);

doesn't seem like this fits here. Should probably be a separate patch.

-- 
balbi

Attachment: signature.asc
Description: Digital signature

Reply via email to