]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: fix missing pm_runtime_put_sync in i2c_device_probe
authorAlain Volmat <alain.volmat@st.com>
Thu, 30 Apr 2020 15:43:21 +0000 (17:43 +0200)
committerWolfram Sang <wsa@kernel.org>
Tue, 5 May 2020 14:27:43 +0000 (16:27 +0200)
commit5612aa1c9671501c2743390b724eb088dd606458
tree82e6479d3c27575bbea994864a8c95b75f3255f6
parent422f3267816a289e77d7735d7ef93621285db504
i2c: fix missing pm_runtime_put_sync in i2c_device_probe

In case of the I2C client exposes the flag I2C_CLIENT_HOST_NOTIFY,
pm_runtime_get_sync is called in order to always keep active the
adapter. However later on, pm_runtime_put_sync is never called
within the function in case of an error. This commit add this
error handling.

Fixes: bfac59cca503 ("i2c: Prevent runtime suspend of adapter when Host Notify is required")
Signed-off-by: Alain Volmat <alain.volmat@st.com>
Reviewed-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/i2c-core-base.c