diff mbox series

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

Message ID 20190328143130.GO32590@kadam (mailing list archive)
State New, archived
Headers show
Series drm/mediatek: Fix an error code in mtk_hdmi_dt_parse_pdata() | expand

Commit Message

Dan Carpenter March 28, 2019, 2:31 p.m. UTC
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>
---
 drivers/gpu/drm/mediatek/mtk_hdmi.c | 1 -
 1 file changed, 1 deletion(-)

Comments

CK Hu (胡俊光) April 2, 2019, 1:43 a.m. UTC | #1
Hi, Dan:

On Thu, 2019-03-28 at 17:31 +0300, Dan Carpenter wrote:
> 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>

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

> ---
>  drivers/gpu/drm/mediatek/mtk_hdmi.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> 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);
diff mbox series

Patch

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