mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Johannes Zink <j.zink@pengutronix.de>
To: barebox@lists.infradead.org
Subject: Re: [PATCH 2/4] phy: propagate error in of_phy_get_by_phandle
Date: Thu, 07 Jul 2022 16:39:51 +0200	[thread overview]
Message-ID: <2394c1d02e1311d5797e02bbb83de2b5b825112e.camel@pengutronix.de> (raw)
In-Reply-To: <20220706142105.2266956-3-m.felsch@pengutronix.de>

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@pengutronix.de>
> ---
>  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@pengutronix.de> # i.MX7




  reply	other threads:[~2022-07-07 14:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-06 14:21 [PATCH 0/4] MX8MN-EVK DDR4 Support Marco Felsch
2022-07-06 14:21 ` [PATCH 1/4] phy: fix deep probe support Marco Felsch
2022-07-07 14:39   ` Johannes Zink
2022-07-06 14:21 ` [PATCH 2/4] phy: propagate error in of_phy_get_by_phandle Marco Felsch
2022-07-07 14:39   ` Johannes Zink [this message]
2022-07-06 14:21 ` [PATCH 3/4] usb: chipidea: imx: call enable_clk after all resources are requested Marco Felsch
2022-07-07 14:40   ` Johannes Zink
2022-07-06 14:21 ` [PATCH 4/4] ARM: i.MX8MN: pass along correct DT depending on variant Marco Felsch
2022-07-11  9:22 ` [PATCH 0/4] MX8MN-EVK DDR4 Support Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2394c1d02e1311d5797e02bbb83de2b5b825112e.camel@pengutronix.de \
    --to=j.zink@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox