disp: msm: use pm_runtime_resume_and_get instead of pm_runtime_get_sync
pm_runtime_get_sync increases the usage_count refcount immaterial of success/failure of the call, leading to invalid refcount on failures. Use pm_runtime_resume_and_get instead, which takes care of reducing the refcount on failure cases before returning from the function. Change-Id: Ib96050d5d7ecbd717e58b8a0dde2d03312444e15 Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
@@ -784,9 +785,9 @@ static int dp_power_init(struct dp_power *dp_power, bool flip)
|
||||
goto err_gpio;
|
||||
}
|
||||
|
||||
rc = pm_runtime_get_sync(dp_power->drm_dev->dev);
|
||||
rc = pm_runtime_resume_and_get(dp_power->drm_dev->dev);
|
||||
if (rc < 0) {
|
||||
DP_ERR("Power resource enable failed\n");
|
||||
DP_ERR("failed to enable power resource %d\n", rc);
|
||||
goto err_sde_power;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user