[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <84c6a027-284c-4985-8125-d46a04c4ea5f@gmail.com>
Date: Sat, 14 Sep 2024 14:10:46 +0200
From: Denis Benato <benato.denis96@...il.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Jagath Jog J <jagathjog1996@...il.com>,
Jonathan Cameron <jic23@...nel.org>, Lars-Peter Clausen <lars@...afoo.de>,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] iio: bmi323: fix reversed if statement in
bmi323_core_runtime_resume()
On 11/09/24 09:54, Dan Carpenter wrote:
> This reversed if statement means that the function just returns success
> without writing to the registers.
>
> Fixes: 16531118ba63 ("iio: bmi323: peripheral in lowest power state on suspend")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
> drivers/iio/imu/bmi323/bmi323_core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/imu/bmi323/bmi323_core.c b/drivers/iio/imu/bmi323/bmi323_core.c
> index d415b6542089..a56259c6434e 100644
> --- a/drivers/iio/imu/bmi323/bmi323_core.c
> +++ b/drivers/iio/imu/bmi323/bmi323_core.c
> @@ -2232,7 +2232,7 @@ static int bmi323_core_runtime_resume(struct device *dev)
> * after being reset in the lower power state by runtime-pm.
> */
> ret = bmi323_init(data);
> - if (!ret)
> + if (ret)
> return ret;
>
> /* Register must be cleared before changing an active config */
Hi,
Thanks for spotting this. May I ask to add an error message in that if case that will also print out the ret value?
Thank you very much!
Best regards,
Denis Benato
Powered by blists - more mailing lists