Message ID | 20200514210847.9269-2-digetx@gmail.com |
---|---|
State | New |
Headers | show |
Series | Tegra Video Decoder driver power management corrections | expand |
diff --git a/drivers/staging/media/tegra-vde/vde.c b/drivers/staging/media/tegra-vde/vde.c index d3e63512a765..803e5dda4bb5 100644 --- a/drivers/staging/media/tegra-vde/vde.c +++ b/drivers/staging/media/tegra-vde/vde.c @@ -776,8 +776,10 @@ static int tegra_vde_ioctl_decode_h264(struct tegra_vde *vde, goto release_dpb_frames; ret = pm_runtime_get_sync(dev); - if (ret < 0) + if (ret < 0) { + pm_runtime_put_noidle(dev); goto unlock; + } /* * We rely on the VDE registers reset value, otherwise VDE
The RPM's use-count is getting incremented regardless of pm_runtime_get_sync() success or fail. It's up to a driver how to handle the failed RPM. In the case of VDE driver, the RPM's use-count should be restored if runtime-resume fails. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> --- drivers/staging/media/tegra-vde/vde.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)