2009-04-28 07:19:51

by Mika Kukkonen

[permalink] [raw]
Subject: [PATCH] Remove extra semicolon from if() in drivers/regulator/core.c

In function drms_uA_update() in file drivers/regulator/core.c there is a tailing semicolon
in the end of if() condition which causes the function in question to return unconditionally.
Remove it to enable rest of the code in the function.

Signed-off-By: Mika Kukkonen <[email protected]>

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 01f7702..47fc6e6 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -540,8 +540,8 @@ static void drms_uA_update(struct regulator_dev *rdev)

err = regulator_check_drms(rdev);
if (err < 0 || !rdev->desc->ops->get_optimum_mode ||
- !rdev->desc->ops->get_voltage || !rdev->desc->ops->set_mode);
- return;
+ !rdev->desc->ops->get_voltage || !rdev->desc->ops->set_mode)
+ return;

/* get output voltage */
output_uV = rdev->desc->ops->get_voltage(rdev);


2009-04-28 13:51:20

by Liam Girdwood

[permalink] [raw]
Subject: Re: [PATCH] Remove extra semicolon from if() in drivers/regulator/core.c

On Tue, 2009-04-28 at 10:17 +0300, Mika Kukkonen wrote:
> In function drms_uA_update() in file drivers/regulator/core.c there is a tailing semicolon
> in the end of if() condition which causes the function in question to return unconditionally.
> Remove it to enable rest of the code in the function.
>
> Signed-off-By: Mika Kukkonen <[email protected]>
>

Thanks. Applied a patch for this recently, will be issuing pull request
tonight.

Liam