Skip to contentSkip to conversation

drm/mediatek: Fix an error code in mtk_hdmi_dt_parse_pdata()

PATCH Applied Dan Carpenter 2 participants 2 messages Mar 28, 2019 – Apr 2, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 drivers/gpu/drm/mediatek/mtk_hdmi.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/mediatek/mtk_hdmi.c +0 -1
index 915cc84621ae..543a25e5765e 100644
@@ -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);
Signature · 1 line
2.17.1
Applied
#1 lore raw

Hi, Dan:

Quoted 5 lines · Dan Carpenter

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")

Applied to mediatek-drm-fixes-5.1 [1], thanks.

[1]
https://github.com/ckhu-mediatek/linux.git-tags/commits/mediatek-drm-fixes-5.1

Regards,
CK

Quoted 16 lines
---
 drivers/gpu/drm/mediatek/mtk_hdmi.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/mediatek/mtk_hdmi.c +0 -1
index 915cc84621ae..543a25e5765e 100644
@@ -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);