path: root/drivers/gpu/drm/msm/dsi/dsi_host.c
diff options
authorBoris Brezillon <>2018-05-09 15:00:39 +0200
committerThierry Reding <>2018-07-10 17:59:05 +0200
commit5fa8e4a22182df8ea39adeba4bd518506e26a96d (patch)
tree4b9a3df577632f7c2165ea86d4d98f2cb5018266 /drivers/gpu/drm/msm/dsi/dsi_host.c
parent0ca0c827efdf248dfb4bbd4b9066acb6337e07ac (diff)
drm/panel: Make of_drm_find_panel() return an ERR_PTR() instead of NULL
Right now, the DRM panel logic returns NULL when a panel pointing to the passed OF node is not present in the list of registered panels. Most drivers interpret this NULL value as -EPROBE_DEFER, but we are about to modify the semantic of of_drm_find_panel() and let the framework return -ENODEV when the device node we're pointing to has a status property that is not equal to "okay" or "ok". Let's first patch the of_drm_find_panel() implementation to return ERR_PTR(-EPROBE_DEFER) instead of NULL and patch all callers to replace the '!panel' check by an 'IS_ERR(panel)' one. Signed-off-by: Boris Brezillon <> Signed-off-by: Thierry Reding <> Link:
Diffstat (limited to 'drivers/gpu/drm/msm/dsi/dsi_host.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 2f1a2780658a..29841f440111 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -1898,7 +1898,7 @@ int msm_dsi_host_register(struct mipi_dsi_host *host, bool check_defer)
* output
if (check_defer && msm_host->device_node) {
- if (!of_drm_find_panel(msm_host->device_node))
+ if (IS_ERR(of_drm_find_panel(msm_host->device_node)))
if (!of_drm_find_bridge(msm_host->device_node))