diff mbox

[U-Boot,v2,2/2] regulator: lp873x: Fix the return value of ldo/buck_get_enable function

Message ID 1497278179-6439-2-git-send-email-j-keerthy@ti.com
State Accepted
Delegated to: Jaehoon Chung
Headers show

Commit Message

J, KEERTHY June 12, 2017, 2:36 p.m. UTC
The functions wrongly returned an integer while it is supposed to
return boolean. Fix that.

Fixes: 99785de83 ("power: regulator: lp873x: Add regulator support")
Signed-off-by: Keerthy <j-keerthy@ti.com>
---

Changes in v2:

  * Squashed patch 2 and 3 of v1 into 1 patch.

 drivers/power/regulator/lp873x_regulator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Jaehoon Chung June 29, 2017, 9:40 a.m. UTC | #1
On 06/12/2017 11:36 PM, Keerthy wrote:
> The functions wrongly returned an integer while it is supposed to
> return boolean. Fix that.
> 
> Fixes: 99785de83 ("power: regulator: lp873x: Add regulator support")
> Signed-off-by: Keerthy <j-keerthy@ti.com>

Applied to u-boot-mmc for pmic. Thanks!

Best Regards,
Jaehoon Chung

> ---
> 
> Changes in v2:
> 
>   * Squashed patch 2 and 3 of v1 into 1 patch.
> 
>  drivers/power/regulator/lp873x_regulator.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/power/regulator/lp873x_regulator.c b/drivers/power/regulator/lp873x_regulator.c
> index dcb19ff..8c26baf 100644
> --- a/drivers/power/regulator/lp873x_regulator.c
> +++ b/drivers/power/regulator/lp873x_regulator.c
> @@ -263,7 +263,7 @@ static bool ldo_get_enable(struct udevice *dev)
>  
>  	ret = lp873x_ldo_enable(dev, PMIC_OP_GET, &enable);
>  	if (ret)
> -		return ret;
> +		return false;
>  
>  	return enable;
>  }
> @@ -318,7 +318,7 @@ static bool buck_get_enable(struct udevice *dev)
>  
>  	ret = lp873x_buck_enable(dev, PMIC_OP_GET, &enable);
>  	if (ret)
> -		return ret;
> +		return false;
>  
>  	return enable;
>  }
>
J, KEERTHY June 29, 2017, 9:59 a.m. UTC | #2
On Thursday 29 June 2017 03:10 PM, Jaehoon Chung wrote:
> On 06/12/2017 11:36 PM, Keerthy wrote:
>> The functions wrongly returned an integer while it is supposed to
>> return boolean. Fix that.
>>
>> Fixes: 99785de83 ("power: regulator: lp873x: Add regulator support")
>> Signed-off-by: Keerthy <j-keerthy@ti.com>
> 
> Applied to u-boot-mmc for pmic. Thanks!

Jaehoon,

Oops! This is not needed as per latest discussion here:
https://www.mail-archive.com/u-boot@lists.denx.de/msg253113.html

Regards,
Keerthy

> 
> Best Regards,
> Jaehoon Chung
> 
>> ---
>>
>> Changes in v2:
>>
>>   * Squashed patch 2 and 3 of v1 into 1 patch.
>>
>>  drivers/power/regulator/lp873x_regulator.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/power/regulator/lp873x_regulator.c b/drivers/power/regulator/lp873x_regulator.c
>> index dcb19ff..8c26baf 100644
>> --- a/drivers/power/regulator/lp873x_regulator.c
>> +++ b/drivers/power/regulator/lp873x_regulator.c
>> @@ -263,7 +263,7 @@ static bool ldo_get_enable(struct udevice *dev)
>>  
>>  	ret = lp873x_ldo_enable(dev, PMIC_OP_GET, &enable);
>>  	if (ret)
>> -		return ret;
>> +		return false;
>>  
>>  	return enable;
>>  }
>> @@ -318,7 +318,7 @@ static bool buck_get_enable(struct udevice *dev)
>>  
>>  	ret = lp873x_buck_enable(dev, PMIC_OP_GET, &enable);
>>  	if (ret)
>> -		return ret;
>> +		return false;
>>  
>>  	return enable;
>>  }
>>
>
diff mbox

Patch

diff --git a/drivers/power/regulator/lp873x_regulator.c b/drivers/power/regulator/lp873x_regulator.c
index dcb19ff..8c26baf 100644
--- a/drivers/power/regulator/lp873x_regulator.c
+++ b/drivers/power/regulator/lp873x_regulator.c
@@ -263,7 +263,7 @@  static bool ldo_get_enable(struct udevice *dev)
 
 	ret = lp873x_ldo_enable(dev, PMIC_OP_GET, &enable);
 	if (ret)
-		return ret;
+		return false;
 
 	return enable;
 }
@@ -318,7 +318,7 @@  static bool buck_get_enable(struct udevice *dev)
 
 	ret = lp873x_buck_enable(dev, PMIC_OP_GET, &enable);
 	if (ret)
-		return ret;
+		return false;
 
 	return enable;
 }