[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0jxEv8UKUuf+PBtaGR95Dpie3vdSOd=VDw21RgYTqM5DQ@mail.gmail.com>
Date: Tue, 7 Jan 2020 11:59:05 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Bjorn Andersson <bjorn.andersson@...aro.org>,
Colin King <colin.king@...onical.com>
Cc: Andy Gross <agross@...nel.org>,
Niklas Cassel <niklas.cassel@...aro.org>,
Kevin Hilman <khilman@...nel.org>, Nishanth Menon <nm@...com>,
"Rafael J . Wysocki" <rafael.j.wysocki@...el.com>,
Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@...aro.org>,
Ulf Hansson <ulf.hansson@...aro.org>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
Linux PM <linux-pm@...r.kernel.org>,
kernel-janitors@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH][next] power: avs: fix uninitialized error return on
failed cpr_read_fuse_uV call
On Mon, Jan 6, 2020 at 8:15 PM Bjorn Andersson
<bjorn.andersson@...aro.org> wrote:
>
> On Mon 06 Jan 04:05 PST 2020, Colin King wrote:
>
> > From: Colin Ian King <colin.king@...onical.com>
> >
> > 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.
> >
>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@...aro.org>
Applied, thanks!
> > Addresses-Coverity: ("Uninitialized scalar variable")
> > Fixes: bf6910abf548 ("power: avs: Add support for CPR (Core Power Reduction)")
> > Signed-off-by: Colin Ian King <colin.king@...onical.com>
> > ---
> > drivers/power/avs/qcom-cpr.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > 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;
> > --
Powered by blists - more mailing lists