[PATCH v2] drm/msm/mdp5: check the return of kzalloc()

2022-04-06 Thread xkernel . wang
From: Xiaoke Wang kzalloc() is a memory allocation function which can return NULL when some internal memory errors happen. So it is better to check it to prevent potential wrong memory access. Besides, since mdp5_plane_reset() is void type, so we should better set `plane-state` to NULL after rel

[PATCH] drm/omapdrm: check the return value of kzalloc()

2022-03-24 Thread xkernel . wang
From: Xiaoke Wang kzalloc() is a memory allocation function which can return NULL when some internal memory errors happen. So it is better to check it. Besides, to properly handle the error, another check is added for the return of omap_irq_wait_init(). Signed-off-by: Xiaoke Wang --- drivers/g

[PATCH] drm/msm/disp: check the return value of kzalloc()

2022-03-24 Thread xkernel . wang
From: Xiaoke Wang kzalloc() is a memory allocation function which can return NULL when some internal memory errors happen. So it is better to check it to prevent potential wrong memory access. Signed-off-by: Xiaoke Wang --- drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 2 ++ 1 file chang

[PATCH] drm/msm/mdp5: check the return of kzalloc()

2022-03-24 Thread xkernel . wang
From: Xiaoke Wang kzalloc() is a memory allocation function which can return NULL when some internal memory errors happen. So it is better to check it to prevent potential wrong memory access. Signed-off-by: Xiaoke Wang --- drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 17 ++--- 1 f

[PATCH] drm: mali-dp: check the return value of kzalloc()

2022-03-23 Thread xkernel . wang
From: Xiaoke Wang kzalloc() is a memory allocation function which can return NULL when some internal memory errors happen. So it is better to check it to prevent potential wrong memory access. Signed-off-by: Xiaoke Wang --- drivers/gpu/drm/arm/malidp_mw.c | 5 - 1 file changed, 4 insertion

[PATCH] drm/i915/selftests: check the return value of kstrdup()

2022-02-23 Thread xkernel . wang
From: Xiaoke Wang kstrdup() is a memory allocation function which can return NULL when some internaly memory errors happen. It is better to check the return value of it to prevent further wrong memory access. Signed-off-by: Xiaoke Wang --- drivers/gpu/drm/i915/selftests/i915_selftest.c | 3 +++

[PATCH] dma-buf: check the return value of kstrdup()

2022-02-23 Thread xkernel . wang
From: Xiaoke Wang kstrdup() is a memory allocation function which can return NULL when some internaly memory errors happen. It is better to check the return value of it to prevent further wrong memory access. Signed-off-by: Xiaoke Wang --- drivers/dma-buf/selftest.c | 3 +++ 1 file changed, 3

[PATCH] video: fbdev: via: check the return value of kstrdup()

2022-02-22 Thread xkernel . wang
From: Xiaoke Wang kstrdup() is a memory allocation function which can return NULL when some internal memory errors happen. It is better to check the return value of it to catch the error in time during the setup of viafb. Signed-off-by: Xiaoke Wang --- drivers/video/fbdev/via/viafbdev.c | 10 +