All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
To: cip-dev@lists.cip-project.org,
	Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>,
	Pavel Machek <pavel@denx.de>
Cc: Biju Das <biju.das.jz@bp.renesas.com>
Subject: [PATCH v2 5.10.y-cip 05/15] iio: adc: rzg2l_adc: Fix -EBUSY timeout error return
Date: Mon, 10 Jan 2022 11:53:38 +0000	[thread overview]
Message-ID: <20220110115348.14297-6-prabhakar.mahadev-lad.rj@bp.renesas.com> (raw)
In-Reply-To: <20220110115348.14297-1-prabhakar.mahadev-lad.rj@bp.renesas.com>

From: Colin Ian King <colin.king@canonical.com>

commit 9909a395e9807aa79145c9289d0c13d0133359a2 upstream.

Currently when a timeout occurs in rzg2l_adc_hw_init the error -EBUSY is
assigned to ret but the error code is used as the function is hard-coded
to return 0.  The variable ret is 0 before entering the while-loop hence
the fix is just to return ret at the end of the function to return the
success 0 or -EBUSY return code.

Addresses-Coverity: ("Unused value")
Fixes: d484c21bacfa ("iio: adc: Add driver for Renesas RZ/G2L A/D converter")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20210817172111.495897-1-colin.king@canonical.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
 drivers/iio/adc/rzg2l_adc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/rzg2l_adc.c b/drivers/iio/adc/rzg2l_adc.c
index 919108d798ba..6472170be9d1 100644
--- a/drivers/iio/adc/rzg2l_adc.c
+++ b/drivers/iio/adc/rzg2l_adc.c
@@ -390,7 +390,7 @@ static int rzg2l_adc_hw_init(struct rzg2l_adc *adc)
 exit_hw_init:
 	clk_disable_unprepare(adc->pclk);
 
-	return 0;
+	return ret;
 }
 
 static void rzg2l_adc_pm_runtime_disable(void *data)
-- 
2.17.1



  parent reply	other threads:[~2022-01-10 11:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10 11:53 [PATCH v2 5.10.y-cip 00/15] Add ADC/CANFD/IIC support for RZ/G2L Lad Prabhakar
2022-01-10 11:53 ` [PATCH v2 5.10.y-cip 01/15] i2c: riic: Add RZ/G2L support Lad Prabhakar
2022-01-10 11:53 ` [PATCH v2 5.10.y-cip 02/15] arm64: defconfig: Enable RIIC Lad Prabhakar
2022-01-10 11:53 ` [PATCH v2 5.10.y-cip 03/15] dt-bindings: iio: adc: Add binding documentation for Renesas RZ/G2L A/D converter Lad Prabhakar
2022-01-10 11:53 ` [PATCH v2 5.10.y-cip 04/15] iio: adc: Add driver " Lad Prabhakar
2022-01-10 11:53 ` Lad Prabhakar [this message]
2022-01-10 11:53 ` [PATCH v2 5.10.y-cip 06/15] iio: adc: rzg2l_adc: add missing clk_disable_unprepare() in rzg2l_adc_pm_runtime_resume() Lad Prabhakar
2022-01-10 11:53 ` [PATCH v2 5.10.y-cip 07/15] clk: renesas: r9a07g044: Add SSIF-2 clock and reset entries Lad Prabhakar
2022-01-10 11:53 ` [PATCH v2 5.10.y-cip 08/15] clk: renesas: r9a07g044: Add clock and reset entries for ADC Lad Prabhakar
2022-01-10 11:53 ` [PATCH v2 5.10.y-cip 09/15] arm64: dts: renesas: r9a07g044: Add ADC node Lad Prabhakar
2022-01-10 11:53 ` [PATCH v2 5.10.y-cip 10/15] arm64: defconfig: Enable RZG2L_ADC Lad Prabhakar
2022-01-10 11:53 ` [PATCH v2 5.10.y-cip 11/15] arm64: dts: renesas: rzg2l-smarc: Enable I2C{0,1,3} support Lad Prabhakar
2022-01-10 11:53 ` [PATCH v2 5.10.y-cip 12/15] arm64: dts: renesas: rzg2l-smarc-som: Move extal and memory nodes to SOM DTSI Lad Prabhakar
2022-01-10 11:53 ` [PATCH v2 5.10.y-cip 13/15] arm64: dts: renesas: rzg2l-smarc-som: Enable ADC on SMARC platform Lad Prabhakar
2022-01-10 11:53 ` [PATCH v2 5.10.y-cip 14/15] arm64: dts: renesas: rzg2l-smarc: Enable CANFD Lad Prabhakar
2022-01-10 11:53 ` [PATCH v2 5.10.y-cip 15/15] clk: renesas: r9a07g044: Mark IA55_CLK and DMAC_ACLK critical Lad Prabhakar
2022-01-10 14:16   ` Biju Das
2022-01-10 18:33     ` Inserting patch into history was " Pavel Machek
2022-01-10 19:17       ` Biju Das
2022-01-11 11:46         ` Pavel Machek
2022-01-10 19:18       ` Jan Kiszka
2022-01-10 18:38 ` [PATCH v2 5.10.y-cip 00/15] Add ADC/CANFD/IIC support for RZ/G2L Pavel Machek

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=20220110115348.14297-6-prabhakar.mahadev-lad.rj@bp.renesas.com \
    --to=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=cip-dev@lists.cip-project.org \
    --cc=nobuhiro1.iwamatsu@toshiba.co.jp \
    --cc=pavel@denx.de \
    /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.