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 <roger.lu@mediatek.com>
Fixes: 6c7174fd90a4690 ("soc: mediatek: mtk-svs: use svs get efuse common function")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Link: https://lore.kernel.org/r/202302160720.N64SWT4l-lkp@intel.com/
Link: https://lore.kernel.org/r/20230216132543.814-1-roger.lu@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
This commit is contained in:
Roger Lu 2023-02-16 21:25:43 +08:00 committed by Matthias Brugger
parent 2ba4e3bd65
commit edecdcccc1
1 changed files with 1 additions and 1 deletions

View File

@ -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);