Joy Chakraborty 1c184baccf rtc: cmos: 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.

cmos_nvram_read()/cmos_nvram_write() currently return the number of
bytes read or written, fix to return 0 on success and -EIO incase number
of bytes requested was not read or written.

Fixes: 8b5b7958fd1c ("rtc: cmos: use generic nvmem")
Cc: stable@vger.kernel.org
Signed-off-by: Joy Chakraborty <joychakr@google.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/20240612083635.1253039-1-joychakr@google.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2024-06-28 00:21:06 +02:00
..
2024-03-08 12:05:10 +01:00
2022-06-24 21:24:02 +02:00
2024-04-17 01:45:33 +02:00
2024-04-17 01:45:33 +02:00
2022-06-24 21:24:02 +02:00
2024-01-18 01:00:21 +01:00
2023-10-15 23:01:08 +02:00
2024-05-07 23:40:10 +02:00
2023-04-26 11:40:26 +01:00