[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b961981c-14b5-469b-b356-2282019ada92@moroto.mountain>
Date: Thu, 13 Jun 2024 15:31:48 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Joy Chakraborty <joychakr@...gle.com>
Cc: Sean Anderson <sean.anderson@...o.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
linux-rtc@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH v2] rtc: abx80x: Fix return value of nvmem callback on
read
On Thu, Jun 13, 2024 at 12:07:50PM +0000, Joy Chakraborty wrote:
> Read callbacks registered with nvmem core expect 0 to be returned on
> success and a negative value to be returned on failure.
>
> abx80x_nvmem_xfer() on read calls i2c_smbus_read_i2c_block_data() which
> returns the number of bytes read on success as per its api description,
> this return value is handled as an error and returned to nvmem even on
> success.
>
> Fix to handle all possible values that would be returned by
> i2c_smbus_read_i2c_block_data().
>
> Fixes: e90ff8ede777 ("rtc: abx80x: Add nvmem support")
> Cc: stable@...r.kernel.org
> Signed-off-by: Joy Chakraborty <joychakr@...gle.com>
Thanks!
Reviewed-by: Dan Carpenter <dan.carpenter@...aro.org>
regards,
dan carpenter
Powered by blists - more mailing lists