Skip to contentSkip to conversation

Remove extra semicolon from if() in drivers/regulator/core.c

PATCH In review Mika Kukkonen 2 participants 2 messages Apr 28, 2009 Voltage and current regulator framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

drivers/regulator/core.c +2 -2
index 01f7702..47fc6e6 100644
@@ -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);
#1 lore raw
Quoted 6 lines · Mika Kukkonen

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.

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

Liam