* [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 [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
Unnamed repository; edit this file 'description' to name the repository.
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://archive.lwn.net:8080/linux-media/0 linux-media/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 linux-media linux-media/ http://archive.lwn.net:8080/linux-media \
linux-media@vger.kernel.org lwn-linux-media@archive.lwn.net
public-inbox-index linux-media
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://archive.lwn.net/lwn.kernel.linux-media
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git