drm/mcde: dsi: Fix return value check in mcde_dsi_bind()
The of_drm_find_bridge() function returns NULL on error, it doesn't return
error pointers so this check doesn't work.
Fixes: 5fc537bfd0
("drm/mcde: Add new driver for ST-Ericsson MCDE")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200430073145.52321-1-weiyongjun1@huawei.com
This commit is contained in:
parent
81a15b9a65
commit
761e9f4f80
@ -1073,10 +1073,9 @@ static int mcde_dsi_bind(struct device *dev, struct device *master,
|
|||||||
panel = NULL;
|
panel = NULL;
|
||||||
|
|
||||||
bridge = of_drm_find_bridge(child);
|
bridge = of_drm_find_bridge(child);
|
||||||
if (IS_ERR(bridge)) {
|
if (!bridge) {
|
||||||
dev_err(dev, "failed to find bridge (%ld)\n",
|
dev_err(dev, "failed to find bridge\n");
|
||||||
PTR_ERR(bridge));
|
return -EINVAL;
|
||||||
return PTR_ERR(bridge);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user