aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Lu <[email protected]>2023-02-16 21:25:43 +0800
committerMatthias Brugger <[email protected]>2023-03-30 11:29:42 +0200
commitedecdcccc1e971b1f0c077ef1f1f714251864aa1 (patch)
treef2aee466704b5bac09aa266fe3d91e70399bf7e6
parent2ba4e3bd65213f3eae75fcd316ae38d4286d333e (diff)
soc: mediatek: mtk-svs: fix passing zero to 'PTR_ERR'
nvmem_cell_get() cannot return NULL so checking for NULL is wrong here. Signed-off-by: Roger Lu <[email protected]> Fixes: 6c7174fd90a4690 ("soc: mediatek: mtk-svs: use svs get efuse common function") Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected]/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
-rw-r--r--drivers/soc/mediatek/mtk-svs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c
index a7eb019b5157..8127fb6d587b 100644
--- a/drivers/soc/mediatek/mtk-svs.c
+++ b/drivers/soc/mediatek/mtk-svs.c
@@ -1726,7 +1726,7 @@ static int svs_get_efuse_data(struct svs_platform *svsp,
struct nvmem_cell *cell;
cell = nvmem_cell_get(svsp->dev, nvmem_cell_name);
- if (IS_ERR_OR_NULL(cell)) {
+ if (IS_ERR(cell)) {
dev_err(svsp->dev, "no \"%s\"? %ld\n",
nvmem_cell_name, PTR_ERR(cell));
return PTR_ERR(cell);