From 595482764904b1732edb487c310bcbdd35551dde Mon Sep 17 00:00:00 2001 From: Kishore Sri venkata Ganesh Bolisetty Date: Tue, 8 Sep 2020 12:40:45 -0700 Subject: [PATCH] soc: qcom: msm_perf: fix error checks in error handling path, remove qos request only if its active. Change-Id: I322764ce736b581ecabdd82cece83c3d6595e4c7 Signed-off-by: Kishore Sri venkata Ganesh Bolisetty --- drivers/soc/qcom/msm_performance.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/qcom/msm_performance.c b/drivers/soc/qcom/msm_performance.c index bd8dedfe3515..3e1e5dfdb805 100644 --- a/drivers/soc/qcom/msm_performance.c +++ b/drivers/soc/qcom/msm_performance.c @@ -106,12 +106,12 @@ static int freq_qos_request_init(void) cleanup: for_each_present_cpu(cpu) { req = &per_cpu(qos_req_min, cpu); - if (req) + if (req && freq_qos_request_active(req)) freq_qos_remove_request(req); req = &per_cpu(qos_req_max, cpu); - if (req) + if (req && freq_qos_request_active(req)) freq_qos_remove_request(req); per_cpu(msm_perf_cpu_stats, cpu).min = 0;