Skip to content
Commit 500580c7 authored by Zhang Zekun's avatar Zhang Zekun Committed by Ulf Hansson
Browse files

pmdomain: qcom-cpr: Fix the return of uninitialized variable



The of_property_read_u64() can fail and remain the variable uninitialized,
which will then be returned. Initializing the variable "rate" to zero to
fix this problem.

Fixes: 181c8148 ("pmdomain: qcom-cpr: Use scope based of_node_put() to simplify code.")
Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-pm/455a6a49-41d2-4a20-9a31-f57ee7a67920@huawei.com/T/#m0a62b501b453a6d6e94c52a428a66f65b5422c65


Signed-off-by: default avatarZhang Zekun <zhangzekun11@huawei.com>
Link: https://lore.kernel.org/r/20240926134211.45394-1-zhangzekun11@huawei.com


Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent eb833367
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment