Skip to contentSkip to conversation

drm/bridge: anx7625: Fix release wrong workqueue

PATCH Applied Xin Ji 3 participants 4 messages Feb 17, 2022 – Mar 1, 2022

Subsystems (3)
lore
Share & tools
lore

Xin Ji

author
#0 lore raw

PATCH 1/1 drm/bridge: anx7625: Fix release wrong workqueue

From: Xin Ji <[email protected]>

If "hdcp_workqueue" exist, must release "hdcp_workqueue", not "workqueue".

Fixes cd1637c7e480 ("drm/bridge: anx7625: add HDCP support")
---
 drivers/gpu/drm/bridge/analogix/anx7625.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/analogix/anx7625.c +2 -2
index 633618bafd75..9aab879a8851 100644
@@ -2736,8 +2736,8 @@ static int anx7625_i2c_remove(struct i2c_client *client)
 
 	if (platform->hdcp_workqueue) {
 		cancel_delayed_work(&platform->hdcp_work);
-		flush_workqueue(platform->workqueue);
-		destroy_workqueue(platform->workqueue);
+		flush_workqueue(platform->hdcp_workqueue);
+		destroy_workqueue(platform->hdcp_workqueue);
 	}
 
 	if (!platform->pdata.low_power_mode)
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Xin Ji

From: Xin Ji <[email protected]>

If "hdcp_workqueue" exist, must release "hdcp_workqueue", not "workqueue".

Fixes cd1637c7e480 ("drm/bridge: anx7625: add HDCP support")

---

This fixes an issue that the driver will crash during unbind.

Quoted 21 lines
 drivers/gpu/drm/bridge/analogix/anx7625.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/analogix/anx7625.c +2 -3
index 633618bafd75..9aab879a8851 100644
@@ -2736,8 +2736,8 @@ static int anx7625_i2c_remove(struct i2c_client *client)
 
        if (platform->hdcp_workqueue) {
                cancel_delayed_work(&platform->hdcp_work);
-               flush_workqueue(platform->workqueue);
-               destroy_workqueue(platform->workqueue);
+               flush_workqueue(platform->hdcp_workqueue);
+               destroy_workqueue(platform->hdcp_workqueue);
        }
 
        if (!platform->pdata.low_power_mode)
--

2.25.1

#2 lore raw
Quoted 8 lines · Hsin-Yi Wang
Quoted 6 lines · Xin Ji

From: Xin Ji <[email protected]>

If "hdcp_workqueue" exist, must release "hdcp_workqueue", not "workqueue".

Quoted 7 lines
Quoted 3 lines
Fixes cd1637c7e480 ("drm/bridge: anx7625: add HDCP support")

---

This fixes an issue that the driver will crash during unbind.

Hi Robert,

Kindly ping on this fix. Thanks.

Quoted 21 lines
Quoted 21 lines
 drivers/gpu/drm/bridge/analogix/anx7625.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/analogix/anx7625.c +2 -3
index 633618bafd75..9aab879a8851 100644
@@ -2736,8 +2736,8 @@ static int anx7625_i2c_remove(struct i2c_client *client)
 
        if (platform->hdcp_workqueue) {
                cancel_delayed_work(&platform->hdcp_work);
-               flush_workqueue(platform->workqueue);
-               destroy_workqueue(platform->workqueue);
+               flush_workqueue(platform->hdcp_workqueue);
+               destroy_workqueue(platform->hdcp_workqueue);
        }
 
        if (!platform->pdata.low_power_mode)
--

2.25.1