kernel_samsung_a53x/drivers/nvmem
Joy Chakraborty 08e85d11e4 nvmem: meson-efuse: Fix return value of nvmem callbacks
commit 7a0a6d0a7c805f9380381f4deedffdf87b93f408 upstream.

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

meson_efuse_read() and meson_efuse_write() call into
meson_sm_call_read() and meson_sm_call_write() respectively which return
the number of bytes read or written on success as per their api
description.

Fix to return error if meson_sm_call_read()/meson_sm_call_write()
returns an error else return 0.

Fixes: a29a63bdaf6f ("nvmem: meson-efuse: simplify read callback")
Cc: stable@vger.kernel.org
Signed-off-by: Joy Chakraborty <joychakr@google.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20240628113704.13742-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-19 14:19:45 +01:00
..
bcm-ocotp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
imx-iim.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
imx-ocotp-scu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
imx-ocotp.c nvmem: imx: correct nregs for i.MX6UL 2024-11-18 10:58:31 +01:00
jz4780-efuse.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lpc18xx_eeprom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lpc18xx_otp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
meson-efuse.c nvmem: meson-efuse: Fix return value of nvmem callbacks 2024-11-19 14:19:45 +01:00
meson-mx-efuse.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtk-efuse.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mxs-ocotp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qcom-spmi-sdam.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qfprom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rave-sp-eeprom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rockchip-efuse.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rockchip-otp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sc27xx-efuse.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
snvs_lpgpr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sprd-efuse.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm32-romem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunxi_sid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uniphier-efuse.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vf610-ocotp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zynqmp_nvmem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00