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
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
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 ++
: 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
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
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
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
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