Skip to content
Commit bce776f1 authored by Zhang Qilong's avatar Zhang Qilong Committed by Guenter Roeck
Browse files

hwmon: (ina3221) Fix PM usage counter unbalance in ina3221_write_enable

pm_runtime_get_sync will increment pm usage counter
even it failed. Forgetting to putting operation will
result in reference leak here. We fix it by replacing
it with pm_runtime_resume_and_get to keep usage counter
balanced. It depends on the mainline commit[PM: runtime:
Add pm_runtime_resume_and_get to deal with usagecounter].

Fixes: 323aeb0e

 ("hwmon: (ina3221) Add PM runtime support")
Signed-off-by: default avatarZhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20201202145320.1135614-1-zhangqilong3@huawei.com
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent b6505459
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