“fb2380a206eae822b17be63e30b5451db992e290”上不存在“drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c”
提交 7d819a95 编写于 作者: J Johan Hovold 提交者: Zheng Zengkai

media: davinci: vpif: fix unbalanced runtime PM enable

stable inclusion
from stable-v5.10.110
commit 20f974dce5df2de0c0267370d176b801e21051c3
bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=20f974dce5df2de0c0267370d176b801e21051c3

--------------------------------

commit d42b3ad1 upstream.

Make sure to disable runtime PM before returning on probe errors.

Fixes: 479f7a11 ("[media] davinci: vpif: adaptions for DT support")
Cc: stable@vger.kernel.org
Cc: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: NJohan Hovold <johan@kernel.org>
Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 06e2bca9
...@@ -428,6 +428,7 @@ static int vpif_probe(struct platform_device *pdev) ...@@ -428,6 +428,7 @@ static int vpif_probe(struct platform_device *pdev)
static struct resource *res, *res_irq; static struct resource *res, *res_irq;
struct platform_device *pdev_capture, *pdev_display; struct platform_device *pdev_capture, *pdev_display;
struct device_node *endpoint = NULL; struct device_node *endpoint = NULL;
int ret;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
vpif_base = devm_ioremap_resource(&pdev->dev, res); vpif_base = devm_ioremap_resource(&pdev->dev, res);
...@@ -458,8 +459,8 @@ static int vpif_probe(struct platform_device *pdev) ...@@ -458,8 +459,8 @@ static int vpif_probe(struct platform_device *pdev)
res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!res_irq) { if (!res_irq) {
dev_warn(&pdev->dev, "Missing IRQ resource.\n"); dev_warn(&pdev->dev, "Missing IRQ resource.\n");
pm_runtime_put(&pdev->dev); ret = -EINVAL;
return -EINVAL; goto err_put_rpm;
} }
pdev_capture = devm_kzalloc(&pdev->dev, sizeof(*pdev_capture), pdev_capture = devm_kzalloc(&pdev->dev, sizeof(*pdev_capture),
...@@ -493,6 +494,12 @@ static int vpif_probe(struct platform_device *pdev) ...@@ -493,6 +494,12 @@ static int vpif_probe(struct platform_device *pdev)
} }
return 0; return 0;
err_put_rpm:
pm_runtime_put(&pdev->dev);
pm_runtime_disable(&pdev->dev);
return ret;
} }
static int vpif_remove(struct platform_device *pdev) static int vpif_remove(struct platform_device *pdev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册