linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: vpif: Fix runtime PM imbalance in vpif_probe
@ 2020-05-23 11:49 Dinghao Liu
  2020-05-27 17:26 ` Lad, Prabhakar
  0 siblings, 1 reply; 2+ messages in thread
From: Dinghao Liu @ 2020-05-23 11:49 UTC (permalink / raw)
  To: dinghao.liu, kjlu
  Cc: Lad, Prabhakar, Mauro Carvalho Chehab, linux-media, linux-kernel

When platform_get_resource() returns an error code, a
pairing runtime PM usage counter decrement is needed
to keep the counter balanced.

Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
---
 drivers/media/platform/davinci/vpif.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/davinci/vpif.c b/drivers/media/platform/davinci/vpif.c
index df66461f5d4f..f28c1b27eac6 100644
--- a/drivers/media/platform/davinci/vpif.c
+++ b/drivers/media/platform/davinci/vpif.c
@@ -458,6 +458,7 @@ static int vpif_probe(struct platform_device *pdev)
 	res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
 	if (!res_irq) {
 		dev_warn(&pdev->dev, "Missing IRQ resource.\n");
+		pm_runtime_put(&pdev->dev);
 		return -EINVAL;
 	}
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: vpif: Fix runtime PM imbalance in vpif_probe
  2020-05-23 11:49 [PATCH] media: vpif: Fix runtime PM imbalance in vpif_probe Dinghao Liu
@ 2020-05-27 17:26 ` Lad, Prabhakar
  0 siblings, 0 replies; 2+ messages in thread
From: Lad, Prabhakar @ 2020-05-27 17:26 UTC (permalink / raw)
  To: Dinghao Liu; +Cc: Kangjie Lu, Mauro Carvalho Chehab, linux-media, LKML

Hi Dinghao,

Thank you for the patch.

On Sat, May 23, 2020 at 12:49 PM Dinghao Liu <dinghao.liu@zju.edu.cn> wrote:
>
> When platform_get_resource() returns an error code, a
> pairing runtime PM usage counter decrement is needed
> to keep the counter balanced.
>
> Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
> ---
>  drivers/media/platform/davinci/vpif.c | 1 +
>  1 file changed, 1 insertion(+)
>
Reviewed-by: Lad Prabhakar <prabhakar.csengg@gmail.com>

Cheers,
--Prabhakar

> diff --git a/drivers/media/platform/davinci/vpif.c b/drivers/media/platform/davinci/vpif.c
> index df66461f5d4f..f28c1b27eac6 100644
> --- a/drivers/media/platform/davinci/vpif.c
> +++ b/drivers/media/platform/davinci/vpif.c
> @@ -458,6 +458,7 @@ static int vpif_probe(struct platform_device *pdev)
>         res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
>         if (!res_irq) {
>                 dev_warn(&pdev->dev, "Missing IRQ resource.\n");
> +               pm_runtime_put(&pdev->dev);
>                 return -EINVAL;
>         }
>
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-27 17:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-23 11:49 [PATCH] media: vpif: Fix runtime PM imbalance in vpif_probe Dinghao Liu
2020-05-27 17:26 ` Lad, Prabhakar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).