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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 31 Oct 2019 13:48:10 +0900
From:   Chanwoo Choi <cw00.choi@...sung.com>
To:     Colin King <colin.king@...onical.com>,
        MyungJoo Ham <myungjoo.ham@...sung.com>
Cc:     kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] extcon: sm5502: remove redundant assignment to variable
 cable_type

On 19. 10. 25. 오후 10:12, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.com>
> 
> The variable cable_type is being initialized with a value that
> is never read and is being re-assigned a little later on. The
> assignment is redundant and hence can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@...onical.com>
> ---
>  drivers/extcon/extcon-sm5502.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/extcon/extcon-sm5502.c b/drivers/extcon/extcon-sm5502.c
> index b3d93baf4fc5..bcf65aaca5d2 100644
> --- a/drivers/extcon/extcon-sm5502.c
> +++ b/drivers/extcon/extcon-sm5502.c
> @@ -276,7 +276,7 @@ static int sm5502_muic_set_path(struct sm5502_muic_info *info,
>  /* Return cable type of attached or detached accessories */
>  static unsigned int sm5502_muic_get_cable_type(struct sm5502_muic_info *info)
>  {
> -	unsigned int cable_type = -1, adc, dev_type1;
> +	unsigned int cable_type, adc, dev_type1;
>  	int ret;
>  
>  	/* Read ADC value according to external cable or button */
> 

Applied it. Thanks.

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ