]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i2c: xiic: xiic_xfer(): Fix runtime PM leak on error path
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 14 Apr 2023 02:10:22 +0000 (19:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:22 +0000 (15:11 +0200)
commit72cb227a368cf286efb8ce1e741e8c7085747b4d
treeb1e0e48a5db8476ed796cca1e739b41ca920bf6f
parenta50c8564ab821bcb31a62799877f789fbd4b95eb
i2c: xiic: xiic_xfer(): Fix runtime PM leak on error path

[ Upstream commit d663d93bb47e7ab45602b227701022d8aa16040a ]

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: fdacc3c7405d ("i2c: xiic: Switch from waitqueue to completion")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Stable-dep-of: 1d4a1adbed25 ("i2c: xiic: Try re-initialization on bus busy timeout")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/i2c/busses/i2c-xiic.c