diff mbox

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

Message ID 1497278179-6439-1-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 function wrongly returned an integer while it is supposed to
return boolean. Fix that.

Fixes: 2dd9dc02a3("power: regulator: lp87565: add regulator support")
Reported-by:Nishanth Menon <nm@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
---
 drivers/power/regulator/lp87565_regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jaehoon Chung June 29, 2017, 9:39 a.m. UTC | #1
Hi,

On 06/12/2017 11:36 PM, Keerthy wrote:
> The function wrongly returned an integer while it is supposed to
> return boolean. Fix that.
> 
> Fixes: 2dd9dc02a3("power: regulator: lp87565: add regulator support")
> Reported-by:Nishanth Menon <nm@ti.com>
> Signed-off-by: Keerthy <j-keerthy@ti.com>

Applied on u-boot-mmc for PMIC. Thanks!

Best Regards,
Jaehoon Chung

> ---
>  drivers/power/regulator/lp87565_regulator.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/regulator/lp87565_regulator.c b/drivers/power/regulator/lp87565_regulator.c
> index 2a0b8ca..e5de578 100644
> --- a/drivers/power/regulator/lp87565_regulator.c
> +++ b/drivers/power/regulator/lp87565_regulator.c
> @@ -174,7 +174,7 @@ static bool buck_get_enable(struct udevice *dev)
>  
>  	ret = lp87565_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:09 PM, Jaehoon Chung wrote:
> Hi,
> 
> On 06/12/2017 11:36 PM, Keerthy wrote:
>> The function wrongly returned an integer while it is supposed to
>> return boolean. Fix that.
>>
>> Fixes: 2dd9dc02a3("power: regulator: lp87565: add regulator support")
>> Reported-by:Nishanth Menon <nm@ti.com>
>> Signed-off-by: Keerthy <j-keerthy@ti.com>
> 
> Applied on 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
> 
>> ---
>>  drivers/power/regulator/lp87565_regulator.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/power/regulator/lp87565_regulator.c b/drivers/power/regulator/lp87565_regulator.c
>> index 2a0b8ca..e5de578 100644
>> --- a/drivers/power/regulator/lp87565_regulator.c
>> +++ b/drivers/power/regulator/lp87565_regulator.c
>> @@ -174,7 +174,7 @@ static bool buck_get_enable(struct udevice *dev)
>>  
>>  	ret = lp87565_buck_enable(dev, PMIC_OP_GET, &enable);
>>  	if (ret)
>> -		return ret;
>> +		return false;
>>  
>>  	return enable;
>>  }
>>
>
Jaehoon Chung June 29, 2017, 10:24 a.m. UTC | #3
Hi Keerthy,

On 06/29/2017 06:59 PM, Keerthy wrote:
> 
> 
> On Thursday 29 June 2017 03:09 PM, Jaehoon Chung wrote:
>> Hi,
>>
>> On 06/12/2017 11:36 PM, Keerthy wrote:
>>> The function wrongly returned an integer while it is supposed to
>>> return boolean. Fix that.
>>>
>>> Fixes: 2dd9dc02a3("power: regulator: lp87565: add regulator support")
>>> Reported-by:Nishanth Menon <nm@ti.com>
>>> Signed-off-by: Keerthy <j-keerthy@ti.com>
>>
>> Applied on 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

I read it now..i will push patches to u-boot-mmc without your patch v2. :)
I'm doing the build testing now. Thanks!

Best Regards,
Jaehoon Chung

> 
> Regards,
> Keerthy
> 
>>
>> Best Regards,
>> Jaehoon Chung
>>
>>> ---
>>>  drivers/power/regulator/lp87565_regulator.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/power/regulator/lp87565_regulator.c b/drivers/power/regulator/lp87565_regulator.c
>>> index 2a0b8ca..e5de578 100644
>>> --- a/drivers/power/regulator/lp87565_regulator.c
>>> +++ b/drivers/power/regulator/lp87565_regulator.c
>>> @@ -174,7 +174,7 @@ static bool buck_get_enable(struct udevice *dev)
>>>  
>>>  	ret = lp87565_buck_enable(dev, PMIC_OP_GET, &enable);
>>>  	if (ret)
>>> -		return ret;
>>> +		return false;
>>>  
>>>  	return enable;
>>>  }
>>>
>>
> 
> 
>
J, KEERTHY June 29, 2017, 10:26 a.m. UTC | #4
On Thursday 29 June 2017 03:54 PM, Jaehoon Chung wrote:
> Hi Keerthy,
> 
> On 06/29/2017 06:59 PM, Keerthy wrote:
>>
>>
>> On Thursday 29 June 2017 03:09 PM, Jaehoon Chung wrote:
>>> Hi,
>>>
>>> On 06/12/2017 11:36 PM, Keerthy wrote:
>>>> The function wrongly returned an integer while it is supposed to
>>>> return boolean. Fix that.
>>>>
>>>> Fixes: 2dd9dc02a3("power: regulator: lp87565: add regulator support")
>>>> Reported-by:Nishanth Menon <nm@ti.com>
>>>> Signed-off-by: Keerthy <j-keerthy@ti.com>
>>>
>>> Applied on 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
> 
> I read it now..i will push patches to u-boot-mmc without your patch v2. :)
> I'm doing the build testing now. Thanks!

Cool Thanks :-)

> 
> Best Regards,
> Jaehoon Chung
> 
>>
>> Regards,
>> Keerthy
>>
>>>
>>> Best Regards,
>>> Jaehoon Chung
>>>
>>>> ---
>>>>  drivers/power/regulator/lp87565_regulator.c | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/power/regulator/lp87565_regulator.c b/drivers/power/regulator/lp87565_regulator.c
>>>> index 2a0b8ca..e5de578 100644
>>>> --- a/drivers/power/regulator/lp87565_regulator.c
>>>> +++ b/drivers/power/regulator/lp87565_regulator.c
>>>> @@ -174,7 +174,7 @@ static bool buck_get_enable(struct udevice *dev)
>>>>  
>>>>  	ret = lp87565_buck_enable(dev, PMIC_OP_GET, &enable);
>>>>  	if (ret)
>>>> -		return ret;
>>>> +		return false;
>>>>  
>>>>  	return enable;
>>>>  }
>>>>
>>>
>>
>>
>>
>
diff mbox

Patch

diff --git a/drivers/power/regulator/lp87565_regulator.c b/drivers/power/regulator/lp87565_regulator.c
index 2a0b8ca..e5de578 100644
--- a/drivers/power/regulator/lp87565_regulator.c
+++ b/drivers/power/regulator/lp87565_regulator.c
@@ -174,7 +174,7 @@  static bool buck_get_enable(struct udevice *dev)
 
 	ret = lp87565_buck_enable(dev, PMIC_OP_GET, &enable);
 	if (ret)
-		return ret;
+		return false;
 
 	return enable;
 }