[PATCH] Fix warning: Using plain integer as NULL pointer in msm_ringbuffer.c

Dipendra Khadka kdipendra88 at gmail.com
Sat Aug 10 11:29:42 UTC 2024


sparse reported following warning:

'''
drivers/gpu/drm/msm/msm_ringbuffer.c:34:31: warning: Using plain integer as NULL pointer
'''

This fix changes integer 0 to NULL.

Signed-off-by: Dipendra Khadka <kdipendra88 at gmail.com>
---
 drivers/gpu/drm/msm/msm_ringbuffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/msm_ringbuffer.c b/drivers/gpu/drm/msm/msm_ringbuffer.c
index e397c44cc011..5c73b8577945 100644
--- a/drivers/gpu/drm/msm/msm_ringbuffer.c
+++ b/drivers/gpu/drm/msm/msm_ringbuffer.c
@@ -31,7 +31,7 @@ struct msm_ringbuffer *msm_ringbuffer_new(struct msm_gpu *gpu, int id,
 
 	if (IS_ERR(ring->start)) {
 		ret = PTR_ERR(ring->start);
-		ring->start = 0;
+		ring->start = NULL;
 		goto fail;
 	}
 
-- 
2.43.0



More information about the dri-devel mailing list