Unverified Commit 5c2b7451 authored by Dan Carpenter's avatar Dan Carpenter Committed by Inki Dae
Browse files

drm/exynos: fix IS_ERR() vs NULL check in probe



The of_drm_find_bridge() does not return error pointers, it returns
NULL on error.

Fixes: dd8b6803 ("exynos: drm: dsi: Attach in_bridge in MIC driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent b13baccc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -434,9 +434,9 @@ static int exynos_mic_probe(struct platform_device *pdev)

	remote = of_graph_get_remote_node(dev->of_node, 1, 0);
	mic->next_bridge = of_drm_find_bridge(remote);
	if (IS_ERR(mic->next_bridge)) {
	if (!mic->next_bridge) {
		DRM_DEV_ERROR(dev, "mic: Failed to find next bridge\n");
		ret = PTR_ERR(mic->next_bridge);
		ret = -EPROBE_DEFER;
		goto err;
	}