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 drivers/gpu/drm/i2c/ch7006_drv.c | 8 ++++++-- drivers/gpu/drm/panel/panel-himax-hx83102.c | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) -- 2.17.1