Skip to content
Commit c4b1fcc3 authored by Ye Weihua's avatar Ye Weihua Committed by Wolfram Sang
Browse files

i2c: imx: Fix PM reference leak in i2c_imx_reg_slave()



pm_runtime_get_sync() will increment the PM reference count even on
failure. Forgetting to put the reference again will result in a leak.

Replace it with pm_runtime_resume_and_get() to keep the usage counter
balanced.

Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarYe Weihua <yeweihua4@huawei.com>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent a85c5c7a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment