aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/arm-cs-trace-disasm.py
diff options
context:
space:
mode:
authorJoy Chakraborty <joychakr@google.com>2024-06-28 12:37:01 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-07-03 16:37:51 +0200
commit28b008751aa295612318a0fbb2f22dd4f6a83139 (patch)
tree944be93773570c032d1ea380220fff629778dec2 /tools/perf/scripts/python/arm-cs-trace-disasm.py
parenta6a0f04e7d28378c181f76d32e4f965aa6a8b0a5 (diff)
nvmem: rmem: Fix return value of rmem_read()
reg_read() callback registered with nvmem core expects 0 on success and a negative value on error but rmem_read() returns the number of bytes read which is treated as an error at the nvmem core. This does not break when rmem is accessed using sysfs via bin_attr_nvmem_read()/write() but causes an error when accessed from places like nvmem_access_with_keepouts(), etc. Change to return 0 on success and error in case memory_read_from_buffer() returns an error or -EIO if bytes read do not match what was requested. Fixes: 5a3fa75a4d9c ("nvmem: Add driver to expose reserved memory as nvmem") Cc: stable@vger.kernel.org Signed-off-by: Joy Chakraborty <joychakr@google.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20240628113704.13742-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/arm-cs-trace-disasm.py')
0 files changed, 0 insertions, 0 deletions