aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_of.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_of.c')
-rw-r--r--drivers/gpu/drm/drm_of.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
index 1f4a16772583..260612958cbe 100644
--- a/drivers/gpu/drm/drm_of.c
+++ b/drivers/gpu/drm/drm_of.c
@@ -239,6 +239,11 @@ int drm_of_find_panel_or_bridge(const struct device_node *np,
if (!remote)
return -ENODEV;
+ if (!of_device_is_available(remote)) {
+ of_node_put(remote);
+ return -ENODEV;
+ }
+
if (panel) {
*panel = of_drm_find_panel(remote);
if (!IS_ERR(*panel))