[PATCH 0/2] drm: Add a check to prevent NULL pointer dereference

2024-10-25 Thread Zhang Zekun
drm_mode_duplicate() could return NULL due to lack of memory, which could cause NULL pointer dereference. Add a check to prevent it. Zhang Zekun (2): drm/i2c/ch7006: Add a check to prevent NULL pointer dereference drm/panel: himax-hx83102: Add a check to prevent NULL pointer dereference

[PATCH 2/2] drm/panel: himax-hx83102: Add a check to prevent NULL pointer dereference

2024-10-25 Thread Zhang Zekun
drm_mode_duplicate() could return NULL due to lack of memory, which will then call NULL pointer dereference. Add a check to prevent it. Fixes: 0ef94554dc40 ("drm/panel: himax-hx83102: Break out as separate driver") Signed-off-by: Zhang Zekun --- drivers/gpu/drm/panel/panel-himax-hx8

[PATCH 1/2] drm/i2c/ch7006: Add a check to prevent NULL pointer dereference

2024-10-25 Thread Zhang Zekun
drm_mode_duplicate() could return NULL due to lack of memory, which will then call NULL pointer dereference. Add a check to prevent it. Fixes: 6ee738610f41 ("drm/nouveau: Add DRM driver for NVIDIA GPUs") Signed-off-by: Zhang Zekun --- drivers/gpu/drm/i2c/ch7006_drv.c | 8 ++

[PATCH] drm/msm: Remove unused declaraions

2024-08-15 Thread Zhang Zekun
: stop setting clock parents manually"). So, let's remove this unused declarations. Signed-off-by: Zhang Zekun --- drivers/gpu/drm/msm/dsi/dsi.h | 2 -- drivers/gpu/drm/msm/msm_drv.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi.h b/drivers/gpu/drm/ms

[PATCH] drm/hisilicon: Remove unused delarations

2024-08-12 Thread Zhang Zekun
hibmc_mm_init() has been removed since commit 28645ae064d1 ("drm/hisilicon/hibmc: Remove hibmc_ttm.c"), but remain the declaration untouched in the header files. So, let's remove this unused declaration. Signed-off-by: Zhang Zekun --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm

[PATCH] drm: Using for_each_available_child_of_node to simplify code logic

2024-08-08 Thread Zhang Zekun
The while loop of of_get_next_available_child() can be replaced by for_each_available_child_of_node(). Using this helper function to make code logic more simple. Signed-off-by: Zhang Zekun --- drivers/gpu/drm/sti/sti_drv.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a

[PATCH] drm: Using for_each_available_child_of_node to simplify code logic

2024-08-08 Thread Zhang Zekun
The while loop of of_get_next_available_child() can be replaced by for_each_available_child_of_node(). Using this helper function to make code logic more simple. Signed-off-by: Zhang Zekun --- drivers/gpu/drm/sti/sti_drv.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a

[PATCH] drm: xlnx: Use devm_platform_ioremap_resource_byname() helper function

2023-08-11 Thread Zhang Zekun
platform_get_resource_byname() and devm_ioremap_resource() can be replaced by devm_platform_ioremap_resource_byname(), which can simplify the code logic a bit, No functional change here. Signed-off-by: Zhang Zekun --- drivers/gpu/drm/xlnx/zynqmp_disp.c | 10 +++--- 1 file changed, 3