drm/bridge: th1520-dw-hdmi: Two fixes
Subsystems (6)
cover drm/bridge: th1520-dw-hdmi: Two fixes
---
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,
Signature · 1 line
Felix Gu <[email protected]>
PATCH 1/2 drm/bridge: th1520-dw-hdmi: Fix error check on dw_hdmi_probe() return value
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.
--- drivers/gpu/drm/bridge/th1520-dw-hdmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/th1520-dw-hdmi.c +2 -2
@@ -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);
Signature · 1 line
2.43.0
Re: [PATCH 1/2] drm/bridge: th1520-dw-hdmi: Fix error check on dw_hdmi_probe() return value
Quoted 11 lines · Felix Gu
The error check after calling
dw_hdmi_probe()was incorrectly checking the struct pointer hdmi instead of the probe resulthdmi->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 <[email protected]>--- drivers/gpu/drm/bridge/th1520-dw-hdmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 2 lines
With best wishes Dmitry
PATCH 2/2 drm/bridge: th1520-dw-hdmi: Fix remove() callback
In reply to Felix GuThis 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().
--- drivers/gpu/drm/bridge/th1520-dw-hdmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/th1520-dw-hdmi.c +2 -2
@@ -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[] = {
Signature · 1 line
2.43.0
Re: [PATCH 2/2] drm/bridge: th1520-dw-hdmi: Fix remove() callback
Quoted 5 lines · Felix Gu
This driver stores struct
th1520_hdmi* in platform drvdata, butth1520_dw_hdmi_remove()was reading it back as structdw_hdmi* and passing it todw_hdmi_remove(), so teardown runs on the wrong pointer.
Quoted 9 lines
Retrieve struct
th1520_hdmi* from platform drvdata and passhdmi->dw_hdmitodw_hdmi_remove().Fixes 96f30ee0fb9d ("drm/bridge: add a driver for T-Head TH1520 HDMI controller")Signed-off-by Felix Gu <[email protected]>--- drivers/gpu/drm/bridge/th1520-dw-hdmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 2 lines
With best wishes Dmitry
Quoted 6 lines · 在 2026-03-21六的 03:12 +0800,Felix Gu写道:
Signed-off-by Felix Gu <[email protected]>---
Felix Gu (2):
drm/bridge: th1520-dw-hdmi: Fix error check ondw_hdmi_probe()return value
drm/bridge: th1520-dw-hdmi: Fixremove()callback
Both fixes look trivial and let me start to doubt how could I make such mistakes.
Quoted 8 lines
drivers/gpu/drm/bridge/th1520-dw-hdmi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)---
base-commit:b5d083a3ed1e2798396d5e491432e887da8d4a06
change-id: 20260321-th1520-f4326138c9bfBest regards,
Quoted 9 lines · Icenowy Zheng
Quoted 6 lines · 在 2026-03-21六的 03:12 +0800,Felix Gu写道:
Signed-off-by Felix Gu <[email protected]>---
Felix Gu (2):
drm/bridge: th1520-dw-hdmi: Fix error check ondw_hdmi_probe()
return value
drm/bridge: th1520-dw-hdmi: Fixremove()callback
Quoted 5 lines
Both fixes look trivial and let me start to doubt how could I make such mistakes.
Reviewed-by Icenowy Zheng <[email protected]>
Hi,
Gentle ping on this.
Best regards,
Felix
Quoted 1 line · 在 2026-03-21六的 03:12 +0800,Felix Gu写道:
Signed-off-by Felix Gu <[email protected]>
Sorry for forgetting this patchset. I'm going to apply it.
This patchset should be now:
Thanks,
Icenowy
Quoted 13 lines
---
Felix Gu (2):
drm/bridge: th1520-dw-hdmi: Fix error check ondw_hdmi_probe()return value
drm/bridge: th1520-dw-hdmi: Fixremove()callbackdrivers/gpu/drm/bridge/th1520-dw-hdmi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)---
base-commit:b5d083a3ed1e2798396d5e491432e887da8d4a06
change-id: 20260321-th1520-f4326138c9bfBest regards,
Icenowy Zheng
AppliedQuoted 1 line · 在 2026-03-21六的 03:12 +0800,Felix Gu写道:
Signed-off-by Felix Gu <[email protected]>
Applied to drm-misc-fixes.
Thanks,
Icenowy
Quoted 13 lines
---
Felix Gu (2):
drm/bridge: th1520-dw-hdmi: Fix error check ondw_hdmi_probe()return value
drm/bridge: th1520-dw-hdmi: Fixremove()callbackdrivers/gpu/drm/bridge/th1520-dw-hdmi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)---
base-commit:b5d083a3ed1e2798396d5e491432e887da8d4a06
change-id: 20260321-th1520-f4326138c9bfBest regards,