summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-10-13 13:21:40 +0300
committerInki Dae <inki.dae@samsung.com>2018-11-05 10:37:24 +0300
commit8727b230f665cadb9349a915c60e6abb18fb083c (patch)
tree01a727bd242a4f57530f050570aac9393bf99e8f /drivers/gpu/drm
parent651022382c7f8da46cb4872a545ee1da6d097d2a (diff)
downloadlinux-8727b230f665cadb9349a915c60e6abb18fb083c.tar.xz
drm/exynos: checking for NULL instead of IS_ERR()
The of_drm_find_panel() function returns error pointers and never NULL but we the driver assumes that ->panel is NULL when it's not present. Fixes: 6afb7721e2a0 ("drm/exynos: move connector creation to attach callback") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_dsi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index 07af7758066d..32f256749789 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -1527,7 +1527,9 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host,
}
dsi->panel = of_drm_find_panel(device->dev.of_node);
- if (dsi->panel) {
+ if (IS_ERR(dsi->panel)) {
+ dsi->panel = NULL;
+ } else {
drm_panel_attach(dsi->panel, &dsi->connector);
dsi->connector.status = connector_status_connected;
}