Commit dbd2f2dc authored by Dinghao Liu's avatar Dinghao Liu Committed by Mauro Carvalho Chehab
Browse files

media: bdisp: Fix runtime PM imbalance on error



pm_runtime_get_sync() increments the runtime PM usage counter even
when it returns an error code. Thus a pairing decrement is needed on
the error handling path to keep the counter balanced.

Signed-off-by: default avatarDinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: default avatarFabien Dessenne <fabien.dessenne@st.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent e8834943
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1367,7 +1367,7 @@ static int bdisp_probe(struct platform_device *pdev)
	ret = pm_runtime_get_sync(dev);
	if (ret < 0) {
		dev_err(dev, "failed to set PM\n");
		goto err_dbg;
		goto err_pm;
	}

	/* Filters */
@@ -1395,7 +1395,6 @@ static int bdisp_probe(struct platform_device *pdev)
	bdisp_hw_free_filters(bdisp->dev);
err_pm:
	pm_runtime_put(dev);
err_dbg:
	bdisp_debugfs_remove(bdisp);
	v4l2_device_unregister(&bdisp->v4l2_dev);
err_clk: