Commit 8727b230 authored by Dan Carpenter's avatar Dan Carpenter Committed by Inki Dae

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: 6afb7721 ("drm/exynos: move connector creation to attach callback")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent 65102238
...@@ -1527,7 +1527,9 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host, ...@@ -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); 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); drm_panel_attach(dsi->panel, &dsi->connector);
dsi->connector.status = connector_status_connected; dsi->connector.status = connector_status_connected;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment