diff mbox

[1/2] extcon: max77693: Fix return value

Message ID 1364383410-15093-1-git-send-email-sachin.kamat@linaro.org
State Superseded
Headers show

Commit Message

Sachin Kamat March 27, 2013, 11:23 a.m. UTC
Return the value obtained from the function instead of hardcoding.
Silences the following warning:
drivers/extcon/extcon-max77693.c:297 max77693_muic_set_path()
info: why not propagate 'ret' from max77693_update_reg() instead of (-11)?
drivers/extcon/extcon-max77693.c:310 max77693_muic_set_path()
info: why not propagate 'ret' from max77693_update_reg() instead of (-11)?

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/extcon/extcon-max77693.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Chanwoo Choi March 27, 2013, 11:21 p.m. UTC | #1
On 03/27/2013 08:23 PM, Sachin Kamat wrote:
> Return the value obtained from the function instead of hardcoding.
> Silences the following warning:
> drivers/extcon/extcon-max77693.c:297 max77693_muic_set_path()
> info: why not propagate 'ret' from max77693_update_reg() instead of (-11)?
> drivers/extcon/extcon-max77693.c:310 max77693_muic_set_path()
> info: why not propagate 'ret' from max77693_update_reg() instead of (-11)?
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> ---
>  drivers/extcon/extcon-max77693.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
> index 8f3c947..894e20e 100644
> --- a/drivers/extcon/extcon-max77693.c
> +++ b/drivers/extcon/extcon-max77693.c
> @@ -294,7 +294,7 @@ static int max77693_muic_set_path(struct max77693_muic_info *info,
>  			MAX77693_MUIC_REG_CTRL1, ctrl1, COMP_SW_MASK);
>  	if (ret < 0) {
>  		dev_err(info->dev, "failed to update MUIC register\n");
> -		return -EAGAIN;
> +		return ret;
>  	}
>  
>  	if (attached)
> @@ -307,7 +307,7 @@ static int max77693_muic_set_path(struct max77693_muic_info *info,
>  			CONTROL2_LOWPWR_MASK | CONTROL2_CPEN_MASK);
>  	if (ret < 0) {
>  		dev_err(info->dev, "failed to update MUIC register\n");
> -		return -EAGAIN;
> +		return ret;
>  	}
>  
>  	dev_info(info->dev,
As my comment about "extcon: max8997: Fix return value",
I wish to receive one patch which modify all of return value with 'ret'
in extcon-max77693.c.

Thanks,
Chanwoo Choi
Sachin Kamat March 28, 2013, 6:41 a.m. UTC | #2
Hi Chanwoo,

On 28 March 2013 04:51, Chanwoo Choi <cw00.choi@samsung.com> wrote:
> On 03/27/2013 08:23 PM, Sachin Kamat wrote:
>> Return the value obtained from the function instead of hardcoding.
>> Silences the following warning:
>> drivers/extcon/extcon-max77693.c:297 max77693_muic_set_path()
>> info: why not propagate 'ret' from max77693_update_reg() instead of (-11)?
>> drivers/extcon/extcon-max77693.c:310 max77693_muic_set_path()
>> info: why not propagate 'ret' from max77693_update_reg() instead of (-11)?
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
[snip]

>>       dev_info(info->dev,
> As my comment about "extcon: max8997: Fix return value",
> I wish to receive one patch which modify all of return value with 'ret'
> in extcon-max77693.c.

Resent both patches as per your suggestion.
diff mbox

Patch

diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
index 8f3c947..894e20e 100644
--- a/drivers/extcon/extcon-max77693.c
+++ b/drivers/extcon/extcon-max77693.c
@@ -294,7 +294,7 @@  static int max77693_muic_set_path(struct max77693_muic_info *info,
 			MAX77693_MUIC_REG_CTRL1, ctrl1, COMP_SW_MASK);
 	if (ret < 0) {
 		dev_err(info->dev, "failed to update MUIC register\n");
-		return -EAGAIN;
+		return ret;
 	}
 
 	if (attached)
@@ -307,7 +307,7 @@  static int max77693_muic_set_path(struct max77693_muic_info *info,
 			CONTROL2_LOWPWR_MASK | CONTROL2_CPEN_MASK);
 	if (ret < 0) {
 		dev_err(info->dev, "failed to update MUIC register\n");
-		return -EAGAIN;
+		return ret;
 	}
 
 	dev_info(info->dev,