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)
committerWolfram Sang <wsa@the-dreams.de>
Wed, 15 Jan 2020 17:17:15 +0000 (18:17 +0100)
commit24a49678f5e20f18006e71b90ac1531876b27eb1
tree68e4541d74f8e3c267f125c43273b87f5c002348
parent9f42de8d4ec2304f10bbc51dc0484f3503d61196
i2c: tegra: Properly disable runtime PM on driver's probe error

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>
drivers/i2c/busses/i2c-tegra.c