summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/mediatek/mtk_hdmi.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-03-28 17:31:30 +0300
committerCK Hu <ck.hu@mediatek.com>2019-04-02 04:25:46 +0300
commit2d85978341e6a32e7443d9f28639da254d53f400 (patch)
tree3f030a72dbf6ee9db15f57403ead7f3ee498126b /drivers/gpu/drm/mediatek/mtk_hdmi.c
parentd6db988a44294d7a91f60ecb87914694ba106305 (diff)
downloadlinux-2d85978341e6a32e7443d9f28639da254d53f400.tar.xz
drm/mediatek: Fix an error code in mtk_hdmi_dt_parse_pdata()
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>
Diffstat (limited to 'drivers/gpu/drm/mediatek/mtk_hdmi.c')
-rw-r--r--drivers/gpu/drm/mediatek/mtk_hdmi.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c
index 915cc84621ae..543a25e5765e 100644
--- a/drivers/gpu/drm/mediatek/mtk_hdmi.c
+++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c
@@ -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);