All of lore.kernel.org
 help / color / mirror / Atom feed
From: <Conor.Dooley@microchip.com>
To: <dan.carpenter@oracle.com>, <Lewis.Hanly@microchip.com>
Cc: <b-liu@ti.com>, <gregkh@linuxfoundation.org>,
	<linux-usb@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] usb: musb: mpfs: Fix error codes in probe()
Date: Fri, 24 Jun 2022 18:19:58 +0000	[thread overview]
Message-ID: <89260173-0017-ad01-0dc9-f9791bd20040@microchip.com> (raw)
In-Reply-To: <YrVmLEc/FOEzNdzj@kili>

On 24/06/2022 08:22, Dan Carpenter wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> These error paths return success but they need to return a negative
> error code.
> 
> Fixes: 7a96b6ea90a4 ("usb: musb: Add support for PolarFire SoC's musb controller")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>   drivers/usb/musb/mpfs.c | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/musb/mpfs.c b/drivers/usb/musb/mpfs.c
> index 99666ef8af06..a69ca338eace 100644
> --- a/drivers/usb/musb/mpfs.c
> +++ b/drivers/usb/musb/mpfs.c
> @@ -181,8 +181,10 @@ static int mpfs_probe(struct platform_device *pdev)
>          glue->clk = clk;
> 
>          pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
> -       if (!pdata)
> +       if (!pdata) {
> +               ret = -ENOMEM;
>                  goto err_clk_disable;
> +       }
> 
>          pdata->config = &mpfs_musb_hdrc_config;
>          pdata->platform_ops = &mpfs_ops;
> @@ -197,6 +199,7 @@ static int mpfs_probe(struct platform_device *pdev)
>          if (IS_ERR(glue->phy)) {
>                  dev_err(dev, "failed to register usb-phy %ld\n",
>                          PTR_ERR(glue->phy));
> +               ret = PTR_ERR(glue->phy);
>                  goto err_clk_disable;
>          }
> 
> --
> 2.35.1
> 

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Thanks Dan and sorry for the bother!
Conor.

      reply	other threads:[~2022-06-24 18:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24  7:22 [PATCH] usb: musb: mpfs: Fix error codes in probe() Dan Carpenter
2022-06-24 18:19 ` Conor.Dooley [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=89260173-0017-ad01-0dc9-f9791bd20040@microchip.com \
    --to=conor.dooley@microchip.com \
    --cc=Lewis.Hanly@microchip.com \
    --cc=b-liu@ti.com \
    --cc=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-usb@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.