Skip to content

Commit 8727b23

Browse files
Dan Carpenterdaeinki
authored andcommitted
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: 6afb772 ("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>
1 parent 6510223 commit 8727b23

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/gpu/drm/exynos/exynos_drm_dsi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,9 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host,
15271527
}
15281528

15291529
dsi->panel = of_drm_find_panel(device->dev.of_node);
1530-
if (dsi->panel) {
1530+
if (IS_ERR(dsi->panel)) {
1531+
dsi->panel = NULL;
1532+
} else {
15311533
drm_panel_attach(dsi->panel, &dsi->connector);
15321534
dsi->connector.status = connector_status_connected;
15331535
}

0 commit comments

Comments
 (0)