drm/sun4i: dw-hdmi: fix error return code in sun8i_dw_hdmi_bind()
authorXiongfeng Wang <wangxiongfeng2@huawei.com>
Mon, 16 Nov 2020 01:09:29 +0000 (09:09 +0800)
committerJernej Skrabec <jernej.skrabec@siol.net>
Tue, 17 Nov 2020 17:23:00 +0000 (18:23 +0100)
Fix to return a negative error code from the error handling case instead
of 0 in function sun8i_dw_hdmi_bind().

Fixes: b7c7436a5ff0 ("drm/sun4i: Implement A83T HDMI driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Link: https://patchwork.freedesktop.org/patch/msgid/1605488969-5211-1-git-send-email-wangxiongfeng2@huawei.com
drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c

index d4c0804..92add2c 100644 (file)
@@ -208,6 +208,7 @@ static int sun8i_dw_hdmi_bind(struct device *dev, struct device *master,
        phy_node = of_parse_phandle(dev->of_node, "phys", 0);
        if (!phy_node) {
                dev_err(dev, "Can't found PHY phandle\n");
+               ret = -EINVAL;
                goto err_disable_clk_tmds;
        }