diff mbox

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

Message ID 1497157289-7652-3-git-send-email-j-keerthy@ti.com
State Superseded
Delegated to: Jaehoon Chung
Headers show

Commit Message

Keerthy June 11, 2017, 5:01 a.m. UTC
The function 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>
---
 drivers/power/regulator/lp873x_regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Nishanth Menon June 12, 2017, 1:39 p.m. UTC | #1
On 06/11/2017 12:01 AM, Keerthy wrote:
> The function 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>
> ---
>   drivers/power/regulator/lp873x_regulator.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/regulator/lp873x_regulator.c b/drivers/power/regulator/lp873x_regulator.c
> index 149a36d..8c26baf 100644
> --- a/drivers/power/regulator/lp873x_regulator.c
> +++ b/drivers/power/regulator/lp873x_regulator.c
> @@ -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;
>   }
> 
just squash 2/3 and 3/3 to a single patch?
Keerthy June 12, 2017, 2:37 p.m. UTC | #2
On Monday 12 June 2017 07:09 PM, Nishanth Menon wrote:
> On 06/11/2017 12:01 AM, Keerthy wrote:
>> The function 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>
>> ---
>>   drivers/power/regulator/lp873x_regulator.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/power/regulator/lp873x_regulator.c
>> b/drivers/power/regulator/lp873x_regulator.c
>> index 149a36d..8c26baf 100644
>> --- a/drivers/power/regulator/lp873x_regulator.c
>> +++ b/drivers/power/regulator/lp873x_regulator.c
>> @@ -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;
>>   }
>>
> just squash 2/3 and 3/3 to a single patch?

Yes. Sent a v2 with both squashed into 1 patch.

>
diff mbox

Patch

diff --git a/drivers/power/regulator/lp873x_regulator.c b/drivers/power/regulator/lp873x_regulator.c
index 149a36d..8c26baf 100644
--- a/drivers/power/regulator/lp873x_regulator.c
+++ b/drivers/power/regulator/lp873x_regulator.c
@@ -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;
 }