All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/mediatek: Fix an error code in mtk_hdmi_dt_parse_pdata()
@ 2019-03-28 14:31 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2019-03-28 14:31 UTC (permalink / raw)
  To: CK Hu, Jie Qiu
  Cc: David Airlie, kernel-janitors, dri-devel, linux-mediatek,
	Matthias Brugger

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

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] drm/mediatek: Fix an error code in mtk_hdmi_dt_parse_pdata()
@ 2019-03-28 14:31 ` Dan Carpenter
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2019-03-28 14:31 UTC (permalink / raw)
  To: CK Hu, Jie Qiu
  Cc: David Airlie, kernel-janitors, dri-devel, linux-mediatek,
	Matthias Brugger

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

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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/mediatek: Fix an error code in mtk_hdmi_dt_parse_pdata()
  2019-03-28 14:31 ` Dan Carpenter
@ 2019-04-02  1:43   ` CK Hu
  -1 siblings, 0 replies; 4+ messages in thread
From: CK Hu @ 2019-04-02  1:43 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Jie Qiu, David Airlie, kernel-janitors, dri-devel,
	linux-mediatek, Matthias Brugger

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/mediatek: Fix an error code in mtk_hdmi_dt_parse_pdata()
@ 2019-04-02  1:43   ` CK Hu
  0 siblings, 0 replies; 4+ messages in thread
From: CK Hu @ 2019-04-02  1:43 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Jie Qiu, David Airlie, kernel-janitors, dri-devel,
	linux-mediatek, Matthias Brugger

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


_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-04-02  1:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-28 14:31 [PATCH] drm/mediatek: Fix an error code in mtk_hdmi_dt_parse_pdata() Dan Carpenter
2019-03-28 14:31 ` Dan Carpenter
2019-04-02  1:43 ` CK Hu
2019-04-02  1:43   ` CK Hu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.