[PATCH] i2c: nomadik: handle pm_runtime errors
Wolfram Sang
wsa+renesas at sang-engineering.com
Tue Nov 10 11:52:34 PST 2026
On Tue, Nov 10, 2026 at 03:06:16PM +0200, Dmitry Guzman wrote:
> In nmk_i2c_xfer(), pm_runtime_get_sync() is called on start and then
> the controller registers are accessed without checking the return value.
> If pm_runtime_get_sync() fails, access to the register of the device that
> was not correctly powered on may cause a bus fault or other unpredictable
> system behavior.
>
> Replace pm_runtime_get_sync() with pm_runtime_resume_and_get() that
> always return 0 on success and automatically restores PM usage counter
> on failure, and return immediately if it returns any error.
>
> Signed-off-by: Dmitry Guzman <Dmitry.Guzman at mobileye.com>
Applied to my for-andi branch, thanks!
More information about the linux-arm-kernel
mailing list