summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-01-06 12:05:58 +0000
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-01-07 11:57:45 +0100
commit5aa0c467519ccd862678a15885026660c271b5b0 (patch)
tree674a164a6bb2099bf448d334135753fe09da119b /drivers/power
parent207ca274cd4c46a418ecb250d555d712e387fce8 (diff)
power: avs: fix uninitialized error return on failed cpr_read_fuse_uV() call
Currently when the call cpr_read_fuse_uV returns an error the value in the uninitialized variable ret is returned. Fix this by instread returning the error value in the variable uV. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: bf6910abf548 ("power: avs: Add support for CPR (Core Power Reduction)") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/avs/qcom-cpr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/avs/qcom-cpr.c b/drivers/power/avs/qcom-cpr.c
index 9247f53550b3..0321729431a5 100644
--- a/drivers/power/avs/qcom-cpr.c
+++ b/drivers/power/avs/qcom-cpr.c
@@ -922,7 +922,7 @@ static int cpr_fuse_corner_init(struct cpr_drv *drv)
uV = cpr_read_fuse_uV(desc, fdata, fuses->init_voltage,
step_volt, drv);
if (uV < 0)
- return ret;
+ return uV;
fuse->min_uV = fdata->min_uV;
fuse->max_uV = fdata->max_uV;