diff mbox series

power: avs: qcom-cpr: Fix error code in cpr_fuse_corner_init()

Message ID 20200108053418.tjc62uppube6q4q3@kili.mountain (mailing list archive)
State Not Applicable, archived
Headers show
Series power: avs: qcom-cpr: Fix error code in cpr_fuse_corner_init() | expand

Commit Message

Dan Carpenter Jan. 8, 2020, 5:34 a.m. UTC
We're returning the wrong variable.  "ret" isn't initialized.

Fixes: bf6910abf548 ("power: avs: Add support for CPR (Core Power Reduction)")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/power/avs/qcom-cpr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rafael J. Wysocki Jan. 8, 2020, 10:29 p.m. UTC | #1
On Wed, Jan 8, 2020 at 6:34 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> We're returning the wrong variable.  "ret" isn't initialized.
>
> Fixes: bf6910abf548 ("power: avs: Add support for CPR (Core Power Reduction)")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.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;
> --

Thanks for the fix, but this issue has been fixed already.
diff mbox series

Patch

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;