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>
This commit is contained in:
parent
4f9b5709cc
commit
4024d6f601
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user