Unverified Commit 8b03e3fc authored by Paul Cercueil's avatar Paul Cercueil Committed by Robert Foss
Browse files

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: default avatarPaul Cercueil <paul@crapouillou.net>
Fixes: 988156dc ("drm: bridge: add it66121 driver")
Reviewed-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
Signed-off-by: default avatarRobert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210827163956.27517-2-paul@crapouillou.net
parent 3a5f3d61
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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);