]> www.infradead.org Git - users/jedix/linux-maple.git/commit
rtc: isl1208: Fix return value of nvmem callbacks
authorJoy Chakraborty <joychakr@google.com>
Wed, 12 Jun 2024 08:08:31 +0000 (08:08 +0000)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 27 Jun 2024 22:20:20 +0000 (00:20 +0200)
commit70f1ae5f0e7f44edf842444044615da7b59838c1
tree44c1107dc3c3f0d8a651ed241076629094cf9ff3
parentc88014c7aa5c4cd39c3a5f4830f6fb525c730693
rtc: isl1208: Fix return value of nvmem callbacks

Read/write callbacks registered with nvmem core expect 0 to be returned
on success and a negative value to be returned on failure.

isl1208_nvmem_read()/isl1208_nvmem_write() currently return the number of
bytes read/written on success, fix to return 0 on success and negative on
failure.

Fixes: c3544f6f51ed ("rtc: isl1208: Add new style nvmem support to driver")
Cc: stable@vger.kernel.org
Signed-off-by: Joy Chakraborty <joychakr@google.com>
Link: https://lore.kernel.org/r/20240612080831.1227131-1-joychakr@google.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-isl1208.c