diff mbox

dw-hdmi: add missing cec_notifier_put

Message ID a7688d13-2d61-ed16-f2df-28cbb5007f38@xs4all.nl (mailing list archive)
State New, archived
Headers show

Commit Message

Hans Verkuil Aug. 7, 2017, 7:20 a.m. UTC
The __dw_hdmi_remove() function was missing a call to cec_notifier_put
to balance the cec_notifier_get in the probe function.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
This fix was in the v3 patch but unfortunately the v2 patch ended up being merged.
So fix this in a separate patch.
---
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Archit Taneja Aug. 7, 2017, 10:57 a.m. UTC | #1
On 08/07/2017 12:50 PM, Hans Verkuil wrote:
> The __dw_hdmi_remove() function was missing a call to cec_notifier_put
> to balance the cec_notifier_get in the probe function.

Queued to drm-misc-next.

Thanks,
Archit

> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> ---
> This fix was in the v3 patch but unfortunately the v2 patch ended up being merged.
> So fix this in a separate patch.
> ---
>   drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index f8171cd07e74..a24ec4ad18bd 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -2496,6 +2496,9 @@ static void __dw_hdmi_remove(struct dw_hdmi *hdmi)
>   	/* Disable all interrupts */
>   	hdmi_writeb(hdmi, ~0, HDMI_IH_MUTE_PHY_STAT0);
> 
> +	if (hdmi->cec_notifier)
> +		cec_notifier_put(hdmi->cec_notifier);
> +
>   	clk_disable_unprepare(hdmi->iahb_clk);
>   	clk_disable_unprepare(hdmi->isfr_clk);
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index f8171cd07e74..a24ec4ad18bd 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -2496,6 +2496,9 @@  static void __dw_hdmi_remove(struct dw_hdmi *hdmi)
 	/* Disable all interrupts */
 	hdmi_writeb(hdmi, ~0, HDMI_IH_MUTE_PHY_STAT0);

+	if (hdmi->cec_notifier)
+		cec_notifier_put(hdmi->cec_notifier);
+
 	clk_disable_unprepare(hdmi->iahb_clk);
 	clk_disable_unprepare(hdmi->isfr_clk);