diff mbox series

drm/bridge: anx7625: Fix release wrong workqueue

Message ID 20220217024418.3780171-1-xji@analogixsemi.com (mailing list archive)
State New, archived
Headers show
Series drm/bridge: anx7625: Fix release wrong workqueue | expand

Commit Message

Xin Ji Feb. 17, 2022, 2:44 a.m. UTC
From: Xin Ji <xji@analogix.corp-partner.google.com>

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

Fixes: cd1637c7e480 ("drm/bridge: anx7625: add HDCP support")
Signed-off-by: Xin Ji <xji@analogixsemi.com>
---
 drivers/gpu/drm/bridge/analogix/anx7625.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Hsin-Yi Wang Feb. 17, 2022, 3:02 a.m. UTC | #1
On Thu, Feb 17, 2022 at 10:45 AM Xin Ji <xji@analogixsemi.com> wrote:
>
> From: Xin Ji <xji@analogix.corp-partner.google.com>
>
> If "hdcp_workqueue" exist, must release "hdcp_workqueue",
> not "workqueue".
>
> Fixes: cd1637c7e480 ("drm/bridge: anx7625: add HDCP support")
> Signed-off-by: Xin Ji <xji@analogixsemi.com>
> ---
Reviewed-by: Hsin-Yi Wang <hsinyi@chromium.org>

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

>  drivers/gpu/drm/bridge/analogix/anx7625.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
> index 633618bafd75..9aab879a8851 100644
> --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
> +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
> @@ -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
>
Hsin-Yi Wang March 1, 2022, 8:58 a.m. UTC | #2
On Thu, Feb 17, 2022 at 11:02 AM Hsin-Yi Wang <hsinyi@chromium.org> wrote:
>
> On Thu, Feb 17, 2022 at 10:45 AM Xin Ji <xji@analogixsemi.com> wrote:
> >
> > From: Xin Ji <xji@analogix.corp-partner.google.com>
> >
> > If "hdcp_workqueue" exist, must release "hdcp_workqueue",
> > not "workqueue".
> >
> > Fixes: cd1637c7e480 ("drm/bridge: anx7625: add HDCP support")
> > Signed-off-by: Xin Ji <xji@analogixsemi.com>
> > ---
> Reviewed-by: Hsin-Yi Wang <hsinyi@chromium.org>
>
> This fixes an issue that the driver will crash during unbind.
>
Hi Robert,

Kindly ping on this fix. Thanks.

> >  drivers/gpu/drm/bridge/analogix/anx7625.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
> > index 633618bafd75..9aab879a8851 100644
> > --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
> > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
> > @@ -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
> >
Robert Foss March 1, 2022, 1:01 p.m. UTC | #3
Applied to drm-misc-next.
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
index 633618bafd75..9aab879a8851 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -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)