i2c: tegra: Properly disable runtime PM on driver's probe error
authorDmitry Osipenko <digetx@gmail.com>
Tue, 14 Jan 2020 01:34:36 +0000 (04:34 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jan 2020 07:22:46 +0000 (08:22 +0100)
commita0885de5cc48efee30eb4ab7f02cb74c5f12aa70
tree4a2d952f5b6aaab5bb7e7cdb3d4701a31c24f71d
parent836162fa1368cb979a3522f8f91dc4e98d289bda
i2c: tegra: Properly disable runtime PM on driver's probe error

commit 24a49678f5e20f18006e71b90ac1531876b27eb1 upstream.

One of the recent Tegra I2C commits made a change that resumes runtime PM
during driver's probe, but it missed to put the RPM in a case of error.
Note that it's not correct to use pm_runtime_status_suspended because it
breaks RPM refcounting.

Fixes: 8ebf15e9c869 ("i2c: tegra: Move suspend handling to NOIRQ phase")
Cc: <stable@vger.kernel.org> # v5.4+
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-tegra.c