Re: [PATCH 2/4] phy: propagate error in of_phy_get_by_phandle

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

 



On Wed, 2022-07-06 at 16:21 +0200, Marco Felsch wrote:
> Don't return -ENODEV if of_phy_provider_lookup() fails instead
> propagate
> the error. So errors like -EPROBE_DEFER are propagated correctly.
> 
> Signed-off-by: Marco Felsch <m.felsch@xxxxxxxxxxxxxx>
> ---
>  drivers/phy/phy-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
> index ef7bd76648..8a57bd1aa9 100644
> --- a/drivers/phy/phy-core.c
> +++ b/drivers/phy/phy-core.c
> @@ -317,7 +317,7 @@ struct phy *of_phy_get_by_phandle(struct device_d
> *dev, const char *phandle,
>  
>         phy_provider = of_phy_provider_lookup(np);
>         if (IS_ERR(phy_provider)) {
> -               return ERR_PTR(-ENODEV);
> +               return ERR_CAST(phy_provider);
>         }
>  
>         return phy_provider->of_xlate(phy_provider->dev, NULL);

Tested-by: Johannes Zink <j.zink@xxxxxxxxxxxxxx> # i.MX7





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux