Commit 5aa0c467 authored by Colin Ian King's avatar Colin Ian King Committed by Rafael J. Wysocki

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: bf6910ab ("power: avs: Add support for CPR (Core Power Reduction)")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 207ca274
......@@ -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;
......
Markdown is supported
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