diff options
| author | Dinghao Liu <dinghao.liu@zju.edu.cn> | 2020-05-21 12:00:21 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-29 09:05:42 +0100 |
| commit | b91c0457733bffb1d062974e0b81270887008ac1 (patch) | |
| tree | e4a8aa4a49a646ba0d5d35862a3cf8b7cfd45ba4 | |
| parent | 8ea75bdf70e032fdb5739d5809debc22d7f3397a (diff) | |
| download | linux-b91c0457733bffb1d062974e0b81270887008ac1.tar.gz linux-b91c0457733bffb1d062974e0b81270887008ac1.tar.bz2 linux-b91c0457733bffb1d062974e0b81270887008ac1.zip | |
media: bdisp: Fix runtime PM imbalance on error
[ Upstream commit dbd2f2dc025f9be8ae063e4f270099677238f620 ]
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: Dinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: Fabien Dessenne <fabien.dessenne@st.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -rw-r--r-- | drivers/media/platform/sti/bdisp/bdisp-v4l2.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c index d88c9ba401b5..bec4278401b2 100644 --- a/drivers/media/platform/sti/bdisp/bdisp-v4l2.c +++ b/drivers/media/platform/sti/bdisp/bdisp-v4l2.c @@ -1366,7 +1366,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 */ @@ -1394,7 +1394,6 @@ err_filter: bdisp_hw_free_filters(bdisp->dev); err_pm: pm_runtime_put(dev); -err_dbg: bdisp_debugfs_remove(bdisp); err_v4l2: v4l2_device_unregister(&bdisp->v4l2_dev); |
