diff options
author | Dinghao Liu <dinghao.liu@zju.edu.cn> | 2020-05-23 14:49:17 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-06-23 14:21:04 +0300 |
commit | 4024d6f601e3c49bae9297930970f68d2621ea1d (patch) | |
tree | 8815d677c96856cc635281118d763937eac6bd0c /drivers/media/platform/davinci | |
parent | 4f9b5709cc087337bf02f004f0a238ec7ebda25b (diff) | |
download | linux-4024d6f601e3c49bae9297930970f68d2621ea1d.tar.xz |
media: vpif: Fix runtime PM imbalance in vpif_probe
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>
Reviewed-by: Lad Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/davinci')
-rw-r--r-- | drivers/media/platform/davinci/vpif.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |