Commit 72cb227a authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Greg Kroah-Hartman
Browse files

i2c: xiic: xiic_xfer(): Fix runtime PM leak on error path



[ Upstream commit d663d93b ]

The xiic_xfer() function gets a runtime PM reference when the function is
entered. This reference is released when the function is exited. There is
currently one error path where the function exits directly, which leads to
a leak of the runtime PM reference.

Make sure that this error path also releases the runtime PM reference.

Fixes: fdacc3c7 ("i2c: xiic: Switch from waitqueue to completion")
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Reviewed-by: default avatarMichal Simek <michal.simek@amd.com>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
Stable-dep-of: 1d4a1adb ("i2c: xiic: Try re-initialization on bus busy timeout")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a50c8564
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment