]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm/bridge: it66121: Wait for next bridge to be probed
authorPaul Cercueil <paul@crapouillou.net>
Fri, 27 Aug 2021 16:39:56 +0000 (17:39 +0100)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 7 Dec 2021 06:32:51 +0000 (07:32 +0100)
BugLink: https://bugs.launchpad.net/bugs/1951822
[ Upstream commit 8b03e3fc79189b17d31a82f5e175698802a11e87 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/gpu/drm/bridge/ite-it66121.c

index b130d01147c6c3cbafbf5690bbf691028880e618..9dc41a7b91362df1011800bc6c7a29f8950311ae 100644 (file)
@@ -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);