linux-stable/drivers/nvmem
Wei Yongjun 36164db278 nvmem: rmem: Fix return value check in rmem_read()
[ Upstream commit 58e92c4a49 ]

In case of error, the function memremap() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.

Fixes: 5a3fa75a4d ("nvmem: Add driver to expose reserved memory as nvmem")
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20221118063840.6357-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:28:39 +01:00
..
bcm-ocotp.c
brcm_nvram.c
core.c nvmem: core: Fix memleak in nvmem_register() 2022-10-26 12:34:23 +02:00
imx-iim.c
imx-ocotp-scu.c
imx-ocotp.c
jz4780-efuse.c
Kconfig nvmem: NVMEM_NINTENDO_OTP should depend on WII 2021-09-21 17:38:37 +02:00
lpc18xx_eeprom.c
lpc18xx_otp.c
Makefile nvmem: nintendo-otp: Add new driver for the Wii and Wii U OTP 2021-08-13 10:27:20 +02:00
meson-efuse.c
meson-mx-efuse.c
mtk-efuse.c
mxs-ocotp.c
nintendo-otp.c nvmem: nintendo-otp: Add new driver for the Wii and Wii U OTP 2021-08-13 10:27:20 +02:00
qcom-spmi-sdam.c
qfprom.c nvmem: qfprom: sc7280: Handle the additional power-domains vote 2021-08-06 15:18:40 +02:00
rave-sp-eeprom.c
rmem.c nvmem: rmem: Fix return value check in rmem_read() 2022-12-08 11:28:39 +01:00
rockchip-efuse.c
rockchip-otp.c
sc27xx-efuse.c
snvs_lpgpr.c
sprd-efuse.c nvmem: sprd: Fix an error message 2021-05-14 13:39:50 +02:00
stm32-romem.c
sunxi_sid.c nvmem: sunxi_sid: Set type to OTP 2021-06-11 10:57:52 +02:00
uniphier-efuse.c
vf610-ocotp.c
zynqmp_nvmem.c