All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][next] phy: qcom-qusb2: fix missing assignment to an error return code
@ 2018-03-21 17:45 Colin King
  2018-03-22  2:49   ` Vivek Gautam
  0 siblings, 1 reply; 3+ messages in thread
From: Colin King @ 2018-03-21 17:45 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Vivek Gautam, Manu Gautam
  Cc: kernel-janitors, linux-kernel

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>
---
 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;
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH][next] phy: qcom-qusb2: fix missing assignment to an error return code
  2018-03-21 17:45 [PATCH][next] phy: qcom-qusb2: fix missing assignment to an error return code Colin King
@ 2018-03-22  2:49   ` Vivek Gautam
  0 siblings, 0 replies; 3+ messages in thread
From: Vivek Gautam @ 2018-03-22  2:37 UTC (permalink / raw)
  To: Colin King, Kishon Vijay Abraham I, Manu Gautam
  Cc: kernel-janitors, linux-kernel



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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][next] phy: qcom-qusb2: fix missing assignment to an error return code
@ 2018-03-22  2:49   ` Vivek Gautam
  0 siblings, 0 replies; 3+ messages in thread
From: Vivek Gautam @ 2018-03-22  2:49 UTC (permalink / raw)
  To: Colin King, Kishon Vijay Abraham I, Manu Gautam
  Cc: kernel-janitors, linux-kernel



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;


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-22  2:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-21 17:45 [PATCH][next] phy: qcom-qusb2: fix missing assignment to an error return code Colin King
2018-03-22  2:37 ` Vivek Gautam
2018-03-22  2:49   ` Vivek Gautam

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.