drm/mediatek: Fix an error code in mtk_hdmi_dt_parse_pdata()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 28 Mar 2019 14:31:30 +0000 (17:31 +0300)
committerCK Hu <ck.hu@mediatek.com>
Tue, 2 Apr 2019 01:25:46 +0000 (09:25 +0800)
We don't want to overwrite "ret", it already holds the correct error
code.  The "regmap" variable might be a valid pointer as this point.

Fixes: 8f83f26891e1 ("drm/mediatek: Add HDMI support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: CK Hu <ck.hu@mediatek.com>
drivers/gpu/drm/mediatek/mtk_hdmi.c

index 915cc84621aeaf62516681a87d56e0e9760197d4..543a25e5765e426bd707b71e509d495b9a7b6cd2 100644 (file)
@@ -1480,7 +1480,6 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi,
        if (IS_ERR(regmap))
                ret = PTR_ERR(regmap);
        if (ret) {
-               ret = PTR_ERR(regmap);
                dev_err(dev,
                        "Failed to get system configuration registers: %d\n",
                        ret);