drm/mediatek: Use NULL instead of 0 for NULL pointer
authorMiles Chen <miles.chen@mediatek.com>
Wed, 11 Jan 2023 02:44:41 +0000 (10:44 +0800)
committerChun-Kuang Hu <chunkuang.hu@kernel.org>
Fri, 27 Jan 2023 00:39:15 +0000 (00:39 +0000)
Use NULL for NULL pointer to fix the following sparse warning:
drivers/gpu/drm/mediatek/mtk_drm_gem.c:265:27: sparse: warning: Using plain integer as NULL pointer

Fixes: 3df64d7b0a4f ("drm/mediatek: Implement gem prime vmap/vunmap function")
Signed-off-by: Miles Chen <miles.chen@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20230111024443.24559-1-miles.chen@mediatek.com/
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
drivers/gpu/drm/mediatek/mtk_drm_gem.c

index 47e96b0289f98ebc345548f92877c6a7e68f45f6..06aadd5e7f5baae5da6455ddaf4c20cb80190b28 100644 (file)
@@ -262,6 +262,6 @@ void mtk_drm_gem_prime_vunmap(struct drm_gem_object *obj,
                return;
 
        vunmap(vaddr);
-       mtk_gem->kvaddr = 0;
+       mtk_gem->kvaddr = NULL;
        kfree(mtk_gem->pages);
 }