[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <OSZPR01MB7019DD199CB1B9A4521A3C28AAFF9@OSZPR01MB7019.jpnprd01.prod.outlook.com>
Date: Wed, 18 Aug 2021 15:50:32 +0000
From: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@...renesas.com>
To: Colin King <colin.king@...onical.com>,
Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Biju Das <biju.das.jz@...renesas.com>,
"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
"linux-renesas-soc@...r.kernel.org"
<linux-renesas-soc@...r.kernel.org>
CC: "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH][next] iio: adc: Fix -EBUSY timeout error return
Hi Colin,
Thank you for the patch.
> -----Original Message-----
> From: Colin King <colin.king@...onical.com>
> Sent: 17 August 2021 18:21
> To: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@...renesas.com>; Jonathan Cameron
> <jic23@...nel.org>; Lars-Peter Clausen <lars@...afoo.de>; Biju Das <biju.das.jz@...renesas.com>;
> linux-iio@...r.kernel.org; linux-renesas-soc@...r.kernel.org
> Cc: kernel-janitors@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: [PATCH][next] iio: adc: Fix -EBUSY timeout error return
>
> From: Colin Ian King <colin.king@...onical.com>
>
> 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@...onical.com>
> ---
> drivers/iio/adc/rzg2l_adc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
iio: adc: rzg2l_adc: Fix -EBUSY timeout error return
with the subject changed to above: Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Cheers,
Prabhakar
> diff --git a/drivers/iio/adc/rzg2l_adc.c b/drivers/iio/adc/rzg2l_adc.c index
> 9996d5eef289..868b183e75ea 100644
> --- a/drivers/iio/adc/rzg2l_adc.c
> +++ b/drivers/iio/adc/rzg2l_adc.c
> @@ -401,7 +401,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.32.0
Powered by blists - more mailing lists