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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 8 Aug 2019 16:55:12 +0300
From:   Roger Quadros <rogerq@...com>
To:     Nishka Dasgupta <nishkadg.linux@...il.com>, <tony@...mide.com>,
        <linux-kernel@...r.kernel.org>, "Kristo, Tero" <t-kristo@...com>
Subject: Re: [PATCH] bus: ti-sysc: Remove if-block in sysc_check_children()

Nishka,

On 08/08/2019 10:40, Nishka Dasgupta wrote:
> In function sysc_check_children, there is an if-statement checking
> whether the value returned by function sysc_check_one_child is non-zero.
> However, sysc_check_one_child always returns 0, and hence this check is
> not needed. Hence remove this if-block.
> 
> Signed-off-by: Nishka Dasgupta <nishkadg.linux@...il.com>
> ---
>  drivers/bus/ti-sysc.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
> index e6deabd8305d..bc8082ae7cb5 100644
> --- a/drivers/bus/ti-sysc.c
> +++ b/drivers/bus/ti-sysc.c
> @@ -637,8 +637,6 @@ static int sysc_check_children(struct sysc *ddata)
>  
>  	for_each_child_of_node(ddata->dev->of_node, child) {
>  		error = sysc_check_one_child(ddata, child);
> -		if (error)
> -			return error;

We cannot assume that sysc_check_one_child() will never return error in the future.
If it can never return an error then why does it have an int return type?

>  	}
>  
>  	return 0;
> 

cheers,
-roger
-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ