diff options
author | Joy Chakraborty <[email protected]> | 2024-06-12 08:36:35 +0000 |
---|---|---|
committer | Alexandre Belloni <[email protected]> | 2024-06-28 00:21:06 +0200 |
commit | 1c184baccf0d5e2ef4cc1562261d0e48508a1c2b (patch) | |
tree | 6cc680f610565f085f5a8cddde221ffd3fdb01f6 /lib/test_fortify/write_overflow-strncpy-src.c | |
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: [email protected]
Signed-off-by: Joy Chakraborty <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexandre Belloni <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions