]> git.baikalelectronics.ru Git - kernel.git/commit
drm/exynos: dpi: Fix NULL pointer dereference with legacy bindings
authorTomasz Figa <tomasz.figa@gmail.com>
Tue, 10 Jun 2014 20:57:57 +0000 (22:57 +0200)
committerInki Dae <inki.dae@samsung.com>
Tue, 24 Jun 2014 02:11:54 +0000 (11:11 +0900)
commitb8894e6b1f8faca6a16885e5a1a409d68f9b1f04
treee89218313491ac73bccefdd6c40fe36b4c31fbea
parent0b878ec7bad6cec4adcf2f2a1b8e14db1e5a5198
drm/exynos: dpi: Fix NULL pointer dereference with legacy bindings

If there is no panel node in DT and instead display timings are provided
directly in FIMD node, there is no panel object created and ctx->panel
becomes NULL. However during Exynos DRM initialization
drm_helper_hpd_irq_event() is called, which in turns calls
exynos_dpi_detect(), which dereferences ctx->panel without a check,
causing a NULL pointer derefrence.

This patch fixes the issue by adding necessary NULL pointer check.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Reviewed-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_dpi.c