public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Mingwei Zheng <zmw12306@gmail.com>
Cc: u.kleine-koenig@baylibre.com, aaro.koskinen@iki.fi, balbi@ti.com,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jiasheng Jiang <jiashengjiangcool@gmail.com>
Subject: Re: [PATCH] USB: phy: tahvo: Add check for clk_enable()
Date: Mon, 16 Dec 2024 08:56:13 +0100	[thread overview]
Message-ID: <2024121649-dreadlock-undesired-d9de@gregkh> (raw)
In-Reply-To: <20241215210006.4114454-1-zmw12306@gmail.com>

On Sun, Dec 15, 2024 at 04:00:06PM -0500, Mingwei Zheng wrote:
> Add check for the return value of clk_enable() to catch the potential
> error.
> 
> Fixes: 9ba96ae5074c ("usb: omap1: Tahvo USB transceiver driver")
> Signed-off-by: Mingwei Zheng <zmw12306@gmail.com>
> Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
> ---
>  drivers/usb/phy/phy-tahvo.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/phy/phy-tahvo.c b/drivers/usb/phy/phy-tahvo.c
> index ae7bf3ff89ee..0b8801318cd2 100644
> --- a/drivers/usb/phy/phy-tahvo.c
> +++ b/drivers/usb/phy/phy-tahvo.c
> @@ -342,8 +342,11 @@ static int tahvo_usb_probe(struct platform_device *pdev)
>  	mutex_init(&tu->serialize);
>  
>  	tu->ick = devm_clk_get(&pdev->dev, "usb_l4_ick");
> -	if (!IS_ERR(tu->ick))
> -		clk_enable(tu->ick);
> +	if (!IS_ERR(tu->ick)) {
> +		ret = clk_enable(tu->ick);
> +		if (ret)
> +			return ret;
> +	}

Same questions, why the signed-off-by order and how was this found and
tested?

thanks,

greg k-h

  reply	other threads:[~2024-12-16  7:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-15 21:00 [PATCH] USB: phy: tahvo: Add check for clk_enable() Mingwei Zheng
2024-12-16  7:56 ` Greg KH [this message]
2024-12-18  3:09   ` Mingwei Zheng

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=2024121649-dreadlock-undesired-d9de@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=aaro.koskinen@iki.fi \
    --cc=balbi@ti.com \
    --cc=jiashengjiangcool@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=u.kleine-koenig@baylibre.com \
    --cc=zmw12306@gmail.com \
    /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