[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230110031242.4917-1-miles.chen@mediatek.com>
Date: Tue, 10 Jan 2023 11:12:42 +0800
From: Miles Chen <miles.chen@...iatek.com>
To: Neil Armstrong <neil.armstrong@...aro.org>,
Kevin Hilman <khilman@...libre.com>,
Jerome Brunet <jbrunet@...libre.com>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
Matthias Brugger <matthias.bgg@...il.com>
CC: <linux-kernel@...r.kernel.org>,
Miles Chen <miles.chen@...iatek.com>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-amlogic@...ts.infradead.org>,
<linux-mediatek@...ts.infradead.org>
Subject: [PATCH] firmware: meson_sm: stop using 0 as NULL pointer
Use NULL for NULL pointer to fix the following sparse warning:
drivers/firmware/meson/meson_sm.c:85:24: sparse: warning: Using plain integer as NULL pointer
Signed-off-by: Miles Chen <miles.chen@...iatek.com>
---
drivers/firmware/meson/meson_sm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/meson/meson_sm.c b/drivers/firmware/meson/meson_sm.c
index 77aa5c6398aa..3f5ff9ed668e 100644
--- a/drivers/firmware/meson/meson_sm.c
+++ b/drivers/firmware/meson/meson_sm.c
@@ -82,7 +82,7 @@ static void __iomem *meson_sm_map_shmem(u32 cmd_shmem, unsigned int size)
sm_phy_base = __meson_sm_call(cmd_shmem, 0, 0, 0, 0, 0);
if (!sm_phy_base)
- return 0;
+ return NULL;
return ioremap_cache(sm_phy_base, size);
}
--
2.18.0
Powered by blists - more mailing lists