[PATCH] firmware: meson_sm: stop using 0 as NULL pointer
Neil Armstrong
neil.armstrong at linaro.org
Tue Jan 10 00:26:50 PST 2023
On 10/01/2023 04:12, Miles Chen wrote:
> 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 at mediatek.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);
> }
Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>
More information about the linux-amlogic
mailing list