i2c: tegra: Add missing pm_runtime_put()
authorDmitry Osipenko <digetx@gmail.com>
Tue, 29 Sep 2020 22:18:45 +0000 (01:18 +0300)
committerWolfram Sang <wsa@kernel.org>
Mon, 5 Oct 2020 20:57:39 +0000 (22:57 +0200)
commite4fc2efbc310cfb665eed558da42ac18084d20bc
tree757b05ed8da7a1fb0bdac75dd563c139b935bbaf
parent900aed24d3e45353e22f7fc00d6826b87c55761a
i2c: tegra: Add missing pm_runtime_put()

The pm_runtime_get_sync() always bumps refcount regardless of whether it
succeeds or fails. Hence driver is responsible for restoring of the RPM
refcounting. This patch adds missing RPM puts which restore refcounting
in a case of pm_runtime_get_sync() error.

Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-tegra.c