mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] soc: mediatek: mtk-svs: change the function IS_ERR_OR_NULL() to IS_ERR()
@ 2023-04-06  2:42 Ziqin Liu
  2023-04-13  7:08 ` 刘紫琴
  0 siblings, 1 reply; 3+ messages in thread
From: Ziqin Liu @ 2023-04-06  2:42 UTC (permalink / raw)
  To: Matthias Brugger, AngeloGioacchino Del Regno
  Cc: Ziqin Liu, Dongliang Mu, linux-kernel, linux-arm-kernel, linux-mediatek

nvmem_cell_get() will return an ERR_PTR() on error or a valid pointer to a
struct nvmem_cell but won't return NULL, the check function should be
IS_ERR() instead of IS_ERR_OR_NULL()

Signed-off-by: Ziqin Liu <ziqin_l@hust.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
---
 drivers/soc/mediatek/mtk-svs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-04-13  9:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-06  2:42 [PATCH] soc: mediatek: mtk-svs: change the function IS_ERR_OR_NULL() to IS_ERR() Ziqin Liu
2023-04-13  7:08 ` 刘紫琴
2023-04-13  9:37   ` Matthias Brugger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®