From: Peter Chen <peter.chen@kernel.org>
To: Alexander Stein <alexander.stein@ew.tq-group.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/1] usb: chipidea: ci_hdrc_imx: use dev_err_probe
Date: Fri, 10 Feb 2023 16:51:40 +0800 [thread overview]
Message-ID: <20230210085140.GB1991028@nchen-desktop> (raw)
In-Reply-To: <20230130094151.95174-1-alexander.stein@ew.tq-group.com>
On 23-01-30 10:41:51, Alexander Stein wrote:
> Add error message if finding USB PHY fails or is deferred.
>
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Acked-by: Peter Chen <peter.chen@kernel.org>
Peter
> ---
> drivers/usb/chipidea/ci_hdrc_imx.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
> index 0dc482542d85..2eeccf4ec9d6 100644
> --- a/drivers/usb/chipidea/ci_hdrc_imx.c
> +++ b/drivers/usb/chipidea/ci_hdrc_imx.c
> @@ -413,15 +413,19 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
> data->phy = devm_usb_get_phy_by_phandle(dev, "fsl,usbphy", 0);
> if (IS_ERR(data->phy)) {
> ret = PTR_ERR(data->phy);
> - if (ret != -ENODEV)
> + if (ret != -ENODEV) {
> + dev_err_probe(dev, ret, "Failed to parse fsl,usbphy\n");
> goto err_clk;
> + }
> data->phy = devm_usb_get_phy_by_phandle(dev, "phys", 0);
> if (IS_ERR(data->phy)) {
> ret = PTR_ERR(data->phy);
> - if (ret == -ENODEV)
> + if (ret == -ENODEV) {
> data->phy = NULL;
> - else
> + } else {
> + dev_err_probe(dev, ret, "Failed to parse phys\n");
> goto err_clk;
> + }
> }
> }
>
> --
> 2.34.1
>
--
Thanks,
Peter Chen
prev parent reply other threads:[~2023-02-10 8:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-30 9:41 [PATCH 1/1] usb: chipidea: ci_hdrc_imx: use dev_err_probe Alexander Stein
2023-02-10 8:51 ` Peter Chen [this message]
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=20230210085140.GB1991028@nchen-desktop \
--to=peter.chen@kernel.org \
--cc=alexander.stein@ew.tq-group.com \
--cc=festevam@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-usb@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.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