lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 28 Mar 2013 08:18:18 +0900
From:	Chanwoo Choi <cw00.choi@...sung.com>
To:	Sachin Kamat <sachin.kamat@...aro.org>
Cc:	linux-kernel@...r.kernel.org, myungjoo.ham@...sung.com,
	patches@...aro.org
Subject: Re: [PATCH 2/2] extcon: max8997: Fix return value

On 03/27/2013 08:23 PM, Sachin Kamat wrote:
> Return the value obtained from the function instead of hardcoding.
> drivers/extcon/extcon-max8997.c:235 max8997_muic_set_path() info:
> why not propagate 'ret' from max8997_update_reg() instead of (-11)?
> drivers/extcon/extcon-max8997.c:248 max8997_muic_set_path() info:
> why not propagate 'ret' from max8997_update_reg() instead of (-11)?
>
> Signed-off-by: Sachin Kamat <sachin.kamat@...aro.org>
> ---
>  drivers/extcon/extcon-max8997.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c
> index 69641bc..05b76b3 100644
> --- a/drivers/extcon/extcon-max8997.c
> +++ b/drivers/extcon/extcon-max8997.c
> @@ -232,7 +232,7 @@ static int max8997_muic_set_path(struct max8997_muic_info *info,
>  			MAX8997_MUIC_REG_CONTROL1, ctrl1, COMP_SW_MASK);
>  	if (ret < 0) {
>  		dev_err(info->dev, "failed to update MUIC register\n");
> -		return -EAGAIN;
> +		return ret;
>  	}
>  
>  	if (attached)
> @@ -245,7 +245,7 @@ static int max8997_muic_set_path(struct max8997_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,
OK, I agree with your opinion. So, can you fix all of these return type
on extcon-max8997.c? I'd like to receive one patch related
to modification for fixing return type.

Thanks,
Chanwoo Choi

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ