All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] drm/bridge: th1520-dw-hdmi: Two fixes
@ 2026-03-20 19:12 ` Felix Gu
  0 siblings, 0 replies; 12+ messages in thread
From: Felix Gu @ 2026-03-20 19:12 UTC (permalink / raw)
  To: Drew Fustini, Guo Ren, Fu Wei, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Icenowy Zheng
  Cc: linux-riscv, dri-devel, linux-kernel, Felix Gu

Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
Felix Gu (2):
      drm/bridge: th1520-dw-hdmi: Fix error check on dw_hdmi_probe() return value
      drm/bridge: th1520-dw-hdmi: Fix remove() callback

 drivers/gpu/drm/bridge/th1520-dw-hdmi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
base-commit: b5d083a3ed1e2798396d5e491432e887da8d4a06
change-id: 20260321-th1520-f4326138c9bf

Best regards,
-- 
Felix Gu <ustc.gu@gmail.com>


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

* [PATCH 0/2] drm/bridge: th1520-dw-hdmi: Two fixes
@ 2026-03-20 19:12 ` Felix Gu
  0 siblings, 0 replies; 12+ messages in thread
From: Felix Gu @ 2026-03-20 19:12 UTC (permalink / raw)
  To: Drew Fustini, Guo Ren, Fu Wei, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Icenowy Zheng
  Cc: linux-riscv, dri-devel, linux-kernel, Felix Gu

Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
Felix Gu (2):
      drm/bridge: th1520-dw-hdmi: Fix error check on dw_hdmi_probe() return value
      drm/bridge: th1520-dw-hdmi: Fix remove() callback

 drivers/gpu/drm/bridge/th1520-dw-hdmi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
base-commit: b5d083a3ed1e2798396d5e491432e887da8d4a06
change-id: 20260321-th1520-f4326138c9bf

Best regards,
-- 
Felix Gu <ustc.gu@gmail.com>


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 1/2] drm/bridge: th1520-dw-hdmi: Fix error check on dw_hdmi_probe() return value
  2026-03-20 19:12 ` Felix Gu
@ 2026-03-20 19:12   ` Felix Gu
  -1 siblings, 0 replies; 12+ messages in thread
From: Felix Gu @ 2026-03-20 19:12 UTC (permalink / raw)
  To: Drew Fustini, Guo Ren, Fu Wei, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Icenowy Zheng
  Cc: linux-riscv, dri-devel, linux-kernel, Felix Gu

The error check after calling dw_hdmi_probe() was incorrectly checking
the struct pointer hdmi instead of the probe result hdmi->dw_hdmi.

Fix this by checking the correct variable.

Fixes: 96f30ee0fb9d ("drm/bridge: add a driver for T-Head TH1520 HDMI controller")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
 drivers/gpu/drm/bridge/th1520-dw-hdmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/th1520-dw-hdmi.c b/drivers/gpu/drm/bridge/th1520-dw-hdmi.c
index 389eead5f1c4..c9968ec1823c 100644
--- a/drivers/gpu/drm/bridge/th1520-dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/th1520-dw-hdmi.c
@@ -136,8 +136,8 @@ static int th1520_dw_hdmi_probe(struct platform_device *pdev)
 	plat_data->priv_data = hdmi;
 
 	hdmi->dw_hdmi = dw_hdmi_probe(pdev, plat_data);
-	if (IS_ERR(hdmi))
-		return PTR_ERR(hdmi);
+	if (IS_ERR(hdmi->dw_hdmi))
+		return PTR_ERR(hdmi->dw_hdmi);
 
 	platform_set_drvdata(pdev, hdmi);
 

-- 
2.43.0


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

* [PATCH 1/2] drm/bridge: th1520-dw-hdmi: Fix error check on dw_hdmi_probe() return value
@ 2026-03-20 19:12   ` Felix Gu
  0 siblings, 0 replies; 12+ messages in thread
From: Felix Gu @ 2026-03-20 19:12 UTC (permalink / raw)
  To: Drew Fustini, Guo Ren, Fu Wei, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Icenowy Zheng
  Cc: linux-riscv, dri-devel, linux-kernel, Felix Gu

The error check after calling dw_hdmi_probe() was incorrectly checking
the struct pointer hdmi instead of the probe result hdmi->dw_hdmi.

Fix this by checking the correct variable.

Fixes: 96f30ee0fb9d ("drm/bridge: add a driver for T-Head TH1520 HDMI controller")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
 drivers/gpu/drm/bridge/th1520-dw-hdmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/th1520-dw-hdmi.c b/drivers/gpu/drm/bridge/th1520-dw-hdmi.c
index 389eead5f1c4..c9968ec1823c 100644
--- a/drivers/gpu/drm/bridge/th1520-dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/th1520-dw-hdmi.c
@@ -136,8 +136,8 @@ static int th1520_dw_hdmi_probe(struct platform_device *pdev)
 	plat_data->priv_data = hdmi;
 
 	hdmi->dw_hdmi = dw_hdmi_probe(pdev, plat_data);
-	if (IS_ERR(hdmi))
-		return PTR_ERR(hdmi);
+	if (IS_ERR(hdmi->dw_hdmi))
+		return PTR_ERR(hdmi->dw_hdmi);
 
 	platform_set_drvdata(pdev, hdmi);
 

-- 
2.43.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* [PATCH 2/2] drm/bridge: th1520-dw-hdmi: Fix remove() callback
  2026-03-20 19:12 ` Felix Gu
@ 2026-03-20 19:12   ` Felix Gu
  -1 siblings, 0 replies; 12+ messages in thread
From: Felix Gu @ 2026-03-20 19:12 UTC (permalink / raw)
  To: Drew Fustini, Guo Ren, Fu Wei, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Icenowy Zheng
  Cc: linux-riscv, dri-devel, linux-kernel, Felix Gu

This driver stores struct th1520_hdmi * in platform drvdata, but
th1520_dw_hdmi_remove() was reading it back as struct dw_hdmi *
and passing it to dw_hdmi_remove(), so teardown runs on the wrong
pointer.

Retrieve struct th1520_hdmi * from platform drvdata and pass
hdmi->dw_hdmi to dw_hdmi_remove().

Fixes: 96f30ee0fb9d ("drm/bridge: add a driver for T-Head TH1520 HDMI controller")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
 drivers/gpu/drm/bridge/th1520-dw-hdmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/th1520-dw-hdmi.c b/drivers/gpu/drm/bridge/th1520-dw-hdmi.c
index c9968ec1823c..6ec9003a8f3f 100644
--- a/drivers/gpu/drm/bridge/th1520-dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/th1520-dw-hdmi.c
@@ -146,9 +146,9 @@ static int th1520_dw_hdmi_probe(struct platform_device *pdev)
 
 static void th1520_dw_hdmi_remove(struct platform_device *pdev)
 {
-	struct dw_hdmi *hdmi = platform_get_drvdata(pdev);
+	struct th1520_hdmi *hdmi = platform_get_drvdata(pdev);
 
-	dw_hdmi_remove(hdmi);
+	dw_hdmi_remove(hdmi->dw_hdmi);
 }
 
 static const struct of_device_id th1520_dw_hdmi_of_table[] = {

-- 
2.43.0


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

* [PATCH 2/2] drm/bridge: th1520-dw-hdmi: Fix remove() callback
@ 2026-03-20 19:12   ` Felix Gu
  0 siblings, 0 replies; 12+ messages in thread
From: Felix Gu @ 2026-03-20 19:12 UTC (permalink / raw)
  To: Drew Fustini, Guo Ren, Fu Wei, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Icenowy Zheng
  Cc: linux-riscv, dri-devel, linux-kernel, Felix Gu

This driver stores struct th1520_hdmi * in platform drvdata, but
th1520_dw_hdmi_remove() was reading it back as struct dw_hdmi *
and passing it to dw_hdmi_remove(), so teardown runs on the wrong
pointer.

Retrieve struct th1520_hdmi * from platform drvdata and pass
hdmi->dw_hdmi to dw_hdmi_remove().

Fixes: 96f30ee0fb9d ("drm/bridge: add a driver for T-Head TH1520 HDMI controller")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
 drivers/gpu/drm/bridge/th1520-dw-hdmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/th1520-dw-hdmi.c b/drivers/gpu/drm/bridge/th1520-dw-hdmi.c
index c9968ec1823c..6ec9003a8f3f 100644
--- a/drivers/gpu/drm/bridge/th1520-dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/th1520-dw-hdmi.c
@@ -146,9 +146,9 @@ static int th1520_dw_hdmi_probe(struct platform_device *pdev)
 
 static void th1520_dw_hdmi_remove(struct platform_device *pdev)
 {
-	struct dw_hdmi *hdmi = platform_get_drvdata(pdev);
+	struct th1520_hdmi *hdmi = platform_get_drvdata(pdev);
 
-	dw_hdmi_remove(hdmi);
+	dw_hdmi_remove(hdmi->dw_hdmi);
 }
 
 static const struct of_device_id th1520_dw_hdmi_of_table[] = {

-- 
2.43.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 0/2] drm/bridge: th1520-dw-hdmi: Two fixes
  2026-03-20 19:12 ` Felix Gu
@ 2026-03-21  5:05   ` Icenowy Zheng
  -1 siblings, 0 replies; 12+ messages in thread
From: Icenowy Zheng @ 2026-03-21  5:05 UTC (permalink / raw)
  To: Felix Gu, Drew Fustini, Guo Ren, Fu Wei, Andrzej Hajda,
	Neil Armstrong, Robert Foss, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: linux-riscv, dri-devel, linux-kernel

在 2026-03-21六的 03:12 +0800,Felix Gu写道:
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
> ---
> Felix Gu (2):
>       drm/bridge: th1520-dw-hdmi: Fix error check on dw_hdmi_probe()
> return value
>       drm/bridge: th1520-dw-hdmi: Fix remove() callback

Both fixes look trivial and let me start to doubt how could I make such
mistakes.

Reviewed-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>

> 
>  drivers/gpu/drm/bridge/th1520-dw-hdmi.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> ---
> base-commit: b5d083a3ed1e2798396d5e491432e887da8d4a06
> change-id: 20260321-th1520-f4326138c9bf
> 
> Best regards,


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

* Re: [PATCH 0/2] drm/bridge: th1520-dw-hdmi: Two fixes
@ 2026-03-21  5:05   ` Icenowy Zheng
  0 siblings, 0 replies; 12+ messages in thread
From: Icenowy Zheng @ 2026-03-21  5:05 UTC (permalink / raw)
  To: Felix Gu, Drew Fustini, Guo Ren, Fu Wei, Andrzej Hajda,
	Neil Armstrong, Robert Foss, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: linux-riscv, dri-devel, linux-kernel

在 2026-03-21六的 03:12 +0800,Felix Gu写道:
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
> ---
> Felix Gu (2):
>       drm/bridge: th1520-dw-hdmi: Fix error check on dw_hdmi_probe()
> return value
>       drm/bridge: th1520-dw-hdmi: Fix remove() callback

Both fixes look trivial and let me start to doubt how could I make such
mistakes.

Reviewed-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>

> 
>  drivers/gpu/drm/bridge/th1520-dw-hdmi.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> ---
> base-commit: b5d083a3ed1e2798396d5e491432e887da8d4a06
> change-id: 20260321-th1520-f4326138c9bf
> 
> Best regards,


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 1/2] drm/bridge: th1520-dw-hdmi: Fix error check on dw_hdmi_probe() return value
  2026-03-20 19:12   ` Felix Gu
@ 2026-03-23  3:52     ` Dmitry Baryshkov
  -1 siblings, 0 replies; 12+ messages in thread
From: Dmitry Baryshkov @ 2026-03-23  3:52 UTC (permalink / raw)
  To: Felix Gu
  Cc: Drew Fustini, Guo Ren, Fu Wei, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Icenowy Zheng, linux-riscv, dri-devel,
	linux-kernel

On Sat, Mar 21, 2026 at 03:12:10AM +0800, Felix Gu wrote:
> The error check after calling dw_hdmi_probe() was incorrectly checking
> the struct pointer hdmi instead of the probe result hdmi->dw_hdmi.
> 
> Fix this by checking the correct variable.
> 
> Fixes: 96f30ee0fb9d ("drm/bridge: add a driver for T-Head TH1520 HDMI controller")
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
> ---
>  drivers/gpu/drm/bridge/th1520-dw-hdmi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

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

* Re: [PATCH 1/2] drm/bridge: th1520-dw-hdmi: Fix error check on dw_hdmi_probe() return value
@ 2026-03-23  3:52     ` Dmitry Baryshkov
  0 siblings, 0 replies; 12+ messages in thread
From: Dmitry Baryshkov @ 2026-03-23  3:52 UTC (permalink / raw)
  To: Felix Gu
  Cc: Maxime Ripard, Drew Fustini, Robert Foss, Thomas Zimmermann,
	dri-devel, Neil Armstrong, Simona Vetter, Jonas Karlman,
	Maarten Lankhorst, Jernej Skrabec, linux-kernel, Guo Ren,
	Laurent Pinchart, Andrzej Hajda, linux-riscv, David Airlie,
	Fu Wei

On Sat, Mar 21, 2026 at 03:12:10AM +0800, Felix Gu wrote:
> The error check after calling dw_hdmi_probe() was incorrectly checking
> the struct pointer hdmi instead of the probe result hdmi->dw_hdmi.
> 
> Fix this by checking the correct variable.
> 
> Fixes: 96f30ee0fb9d ("drm/bridge: add a driver for T-Head TH1520 HDMI controller")
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
> ---
>  drivers/gpu/drm/bridge/th1520-dw-hdmi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

* Re: [PATCH 2/2] drm/bridge: th1520-dw-hdmi: Fix remove() callback
  2026-03-20 19:12   ` Felix Gu
@ 2026-03-23  3:53     ` Dmitry Baryshkov
  -1 siblings, 0 replies; 12+ messages in thread
From: Dmitry Baryshkov @ 2026-03-23  3:53 UTC (permalink / raw)
  To: Felix Gu
  Cc: Drew Fustini, Guo Ren, Fu Wei, Andrzej Hajda, Neil Armstrong,
	Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Simona Vetter, Icenowy Zheng, linux-riscv, dri-devel,
	linux-kernel

On Sat, Mar 21, 2026 at 03:12:11AM +0800, Felix Gu wrote:
> This driver stores struct th1520_hdmi * in platform drvdata, but
> th1520_dw_hdmi_remove() was reading it back as struct dw_hdmi *
> and passing it to dw_hdmi_remove(), so teardown runs on the wrong
> pointer.
> 
> Retrieve struct th1520_hdmi * from platform drvdata and pass
> hdmi->dw_hdmi to dw_hdmi_remove().
> 
> Fixes: 96f30ee0fb9d ("drm/bridge: add a driver for T-Head TH1520 HDMI controller")
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
> ---
>  drivers/gpu/drm/bridge/th1520-dw-hdmi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

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

* Re: [PATCH 2/2] drm/bridge: th1520-dw-hdmi: Fix remove() callback
@ 2026-03-23  3:53     ` Dmitry Baryshkov
  0 siblings, 0 replies; 12+ messages in thread
From: Dmitry Baryshkov @ 2026-03-23  3:53 UTC (permalink / raw)
  To: Felix Gu
  Cc: Maxime Ripard, Drew Fustini, Robert Foss, Thomas Zimmermann,
	dri-devel, Neil Armstrong, Simona Vetter, Jonas Karlman,
	Maarten Lankhorst, Jernej Skrabec, linux-kernel, Guo Ren,
	Laurent Pinchart, Andrzej Hajda, linux-riscv, David Airlie,
	Fu Wei

On Sat, Mar 21, 2026 at 03:12:11AM +0800, Felix Gu wrote:
> This driver stores struct th1520_hdmi * in platform drvdata, but
> th1520_dw_hdmi_remove() was reading it back as struct dw_hdmi *
> and passing it to dw_hdmi_remove(), so teardown runs on the wrong
> pointer.
> 
> Retrieve struct th1520_hdmi * from platform drvdata and pass
> hdmi->dw_hdmi to dw_hdmi_remove().
> 
> Fixes: 96f30ee0fb9d ("drm/bridge: add a driver for T-Head TH1520 HDMI controller")
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
> ---
>  drivers/gpu/drm/bridge/th1520-dw-hdmi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>


-- 
With best wishes
Dmitry

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

end of thread, other threads:[~2026-03-23  3:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-20 19:12 [PATCH 0/2] drm/bridge: th1520-dw-hdmi: Two fixes Felix Gu
2026-03-20 19:12 ` Felix Gu
2026-03-20 19:12 ` [PATCH 1/2] drm/bridge: th1520-dw-hdmi: Fix error check on dw_hdmi_probe() return value Felix Gu
2026-03-20 19:12   ` Felix Gu
2026-03-23  3:52   ` Dmitry Baryshkov
2026-03-23  3:52     ` Dmitry Baryshkov
2026-03-20 19:12 ` [PATCH 2/2] drm/bridge: th1520-dw-hdmi: Fix remove() callback Felix Gu
2026-03-20 19:12   ` Felix Gu
2026-03-23  3:53   ` Dmitry Baryshkov
2026-03-23  3:53     ` Dmitry Baryshkov
2026-03-21  5:05 ` [PATCH 0/2] drm/bridge: th1520-dw-hdmi: Two fixes Icenowy Zheng
2026-03-21  5:05   ` Icenowy Zheng

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.