mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
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: bf6910abf5
("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>
This commit is contained in:
parent
207ca274cd
commit
5aa0c46751
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue