diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2020-04-30 10:31:45 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-05-12 14:48:24 +0300 |
commit | 761e9f4f80a21a4b845097027030bef863001636 (patch) | |
tree | 861ffee59017444b3422fde5f8f6fd66e1c146ca /drivers/gpu/drm/mcde | |
parent | 81a15b9a65565dc819c909512c9d83620b33e7ec (diff) | |
download | linux-761e9f4f80a21a4b845097027030bef863001636.tar.xz |
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: 5fc537bfd000 ("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
Diffstat (limited to 'drivers/gpu/drm/mcde')
-rw-r--r-- | drivers/gpu/drm/mcde/mcde_dsi.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c index 1baa2324cdb9..f303369305a3 100644 --- a/drivers/gpu/drm/mcde/mcde_dsi.c +++ b/drivers/gpu/drm/mcde/mcde_dsi.c @@ -1073,10 +1073,9 @@ static int mcde_dsi_bind(struct device *dev, struct device *master, panel = NULL; bridge = of_drm_find_bridge(child); - if (IS_ERR(bridge)) { - dev_err(dev, "failed to find bridge (%ld)\n", - PTR_ERR(bridge)); - return PTR_ERR(bridge); + if (!bridge) { + dev_err(dev, "failed to find bridge\n"); + return -EINVAL; } } } |