diff mbox series

[1/4] media: davinci: vpif: fix unbalanced runtime PM get

Message ID 20211222142025.30364-2-johan@kernel.org
State Superseded
Headers show
Series [1/4] media: davinci: vpif: fix unbalanced runtime PM get | expand

Commit Message

Johan Hovold Dec. 22, 2021, 2:20 p.m. UTC
Make sure to balance the runtime PM usage counter on driver unbind.

Fixes: 407ccc65bfd2 ("[media] davinci: vpif: add pm_runtime support")
Cc: stable@vger.kernel.org      # 3.9
Cc: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/media/platform/davinci/vpif.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Lad, Prabhakar Jan. 4, 2022, 6:05 p.m. UTC | #1
Hi Johan,

Thank you for the patch.

On Wed, Dec 22, 2021 at 2:20 PM Johan Hovold <johan@kernel.org> wrote:
>
> Make sure to balance the runtime PM usage counter on driver unbind.
>
> Fixes: 407ccc65bfd2 ("[media] davinci: vpif: add pm_runtime support")
> Cc: stable@vger.kernel.org      # 3.9
> Cc: Lad, Prabhakar <prabhakar.csengg@gmail.com>
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
>  drivers/media/platform/davinci/vpif.c | 1 +
>  1 file changed, 1 insertion(+)
>
Reviewed-by: Lad Prabhakar <prabhakar.csengg@gmail.com>

> diff --git a/drivers/media/platform/davinci/vpif.c b/drivers/media/platform/davinci/vpif.c
> index 5a89d885d0e3..9752a5ec36f7 100644
> --- a/drivers/media/platform/davinci/vpif.c
> +++ b/drivers/media/platform/davinci/vpif.c
> @@ -495,6 +495,7 @@ static int vpif_probe(struct platform_device *pdev)
>
>  static int vpif_remove(struct platform_device *pdev)
>  {
> +       pm_runtime_put(&pdev->dev);
>         pm_runtime_disable(&pdev->dev);
>         return 0;
>  }
> --
> 2.32.0
>

Cheers,
Prabhakar
diff mbox series

Patch

diff --git a/drivers/media/platform/davinci/vpif.c b/drivers/media/platform/davinci/vpif.c
index 5a89d885d0e3..9752a5ec36f7 100644
--- a/drivers/media/platform/davinci/vpif.c
+++ b/drivers/media/platform/davinci/vpif.c
@@ -495,6 +495,7 @@  static int vpif_probe(struct platform_device *pdev)
 
 static int vpif_remove(struct platform_device *pdev)
 {
+	pm_runtime_put(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
 	return 0;
 }