summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2021-08-27 19:39:56 +0300
committerRobert Foss <robert.foss@linaro.org>2021-08-31 17:12:52 +0300
commit8b03e3fc79189b17d31a82f5e175698802a11e87 (patch)
tree41daad41a2e7739f335c4e908bf0294993e7c6f3 /drivers/gpu
parent3a5f3d61de657bc1c2b53b77d065c5526f982e10 (diff)
downloadlinux-8b03e3fc79189b17d31a82f5e175698802a11e87.tar.xz
drm/bridge: it66121: Wait for next bridge to be probed
If run before the next bridge is initialized, of_drm_find_bridge() will give us a NULL pointer. If that's the case, return -EPROBE_DEFER; we may have more luck next time. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Fixes: 988156dc2fc9 ("drm: bridge: add it66121 driver") Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Robert Foss <robert.foss@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20210827163956.27517-2-paul@crapouillou.net
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/bridge/ite-it66121.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c
index b130d01147c6..9dc41a7b9136 100644
--- a/drivers/gpu/drm/bridge/ite-it66121.c
+++ b/drivers/gpu/drm/bridge/ite-it66121.c
@@ -924,6 +924,9 @@ static int it66121_probe(struct i2c_client *client,
ctx->next_bridge = of_drm_find_bridge(ep);
of_node_put(ep);
+ if (!ctx->next_bridge)
+ return -EPROBE_DEFER;
+
i2c_set_clientdata(client, ctx);
mutex_init(&ctx->lock);