mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vivek Gautam <vivek.gautam@codeaurora.org>
To: Colin King <colin.king@canonical.com>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Manu Gautam <mgautam@codeaurora.org>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] phy: qcom-qusb2: fix missing assignment to an error return code
Date: Thu, 22 Mar 2018 08:07:46 +0530	[thread overview]
Message-ID: <40d4e9a6-86c0-4f1d-4768-b27209ab4890@codeaurora.org> (raw)
In-Reply-To: <20180321174538.2194-1-colin.king@canonical.com>



On 3/21/2018 11:15 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The error return code is not being assigned to ret from the call
> to clk_prepare_enable and consequently the current check on ret
> picks up the previous error return. Fix this by adding in the
> missing assignment to ret.
>
> Detected by CoverityScan, CID#166020 ("Logically Dead code")
>
> Fixes: 891a96f65ac3 ("phy: qcom-qusb2: Add support for runtime PM)
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---

Acked-by: Vivek Gautam <vivek.gautam@codeaurora.org>

regards
Vivek

>   drivers/phy/qualcomm/phy-qcom-qusb2.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/phy/qualcomm/phy-qcom-qusb2.c b/drivers/phy/qualcomm/phy-qcom-qusb2.c
> index 94afeac1a19e..6f5689a40884 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qusb2.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qusb2.c
> @@ -439,7 +439,7 @@ static int __maybe_unused qusb2_phy_runtime_resume(struct device *dev)
>   	}
>   
>   	if (!qphy->has_se_clk_scheme) {
> -		clk_prepare_enable(qphy->ref_clk);
> +		ret = clk_prepare_enable(qphy->ref_clk);
>   		if (ret) {
>   			dev_err(dev, "failed to enable ref clk, %d\n", ret);
>   			goto disable_ahb_clk;

      reply	other threads:[~2018-03-22  2:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-21 17:45 Colin King
2018-03-22  2:37 ` Vivek Gautam [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=40d4e9a6-86c0-4f1d-4768-b27209ab4890@codeaurora.org \
    --to=vivek.gautam@codeaurora.org \
    --cc=colin.king@canonical.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kishon@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgautam@codeaurora.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

all inboxes | Powered by JetHome®