diff options
author | Joy Chakraborty <joychakr@google.com> | 2024-06-12 08:36:35 +0000 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2024-06-28 00:21:06 +0200 |
commit | 1c184baccf0d5e2ef4cc1562261d0e48508a1c2b (patch) | |
tree | 6cc680f610565f085f5a8cddde221ffd3fdb01f6 /scripts/get_dvb_firmware | |
parent | 70f1ae5f0e7f44edf842444044615da7b59838c1 (diff) |
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>
Diffstat (limited to 'scripts/get_dvb_firmware')
0 files changed, 0 insertions, 0 deletions