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]
Message-ID: <383d5191-ec3f-49d6-106a-ffb33e0c3a5d@redhat.com>
Date:   Tue, 3 May 2022 20:17:34 +0200
From:   David Hildenbrand <david@...hat.com>
To:     Davidlohr Bueso <dave@...olabs.net>, linux-mm@...ck.org
Cc:     mhocko@...nel.org, akpm@...ux-foundation.org, rientjes@...gle.com,
        yosryahmed@...gle.com, hannes@...xchg.org, shakeelb@...gle.com,
        dave.hansen@...ux.intel.com, tim.c.chen@...ux.intel.com,
        roman.gushchin@...ux.dev, gthelen@...gle.com,
        a.manzanares@...sung.com, heekwon.p@...sung.com,
        gim.jongmin@...sung.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/6] drivers/base/node: cleanup register_node()

On 16.04.22 07:38, Davidlohr Bueso wrote:
> Trivially get rid of some unnecessary indentation.
> 
> Signed-off-by: Davidlohr Bueso <dave@...olabs.net>
> ---
>  drivers/base/node.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/base/node.c b/drivers/base/node.c
> index ec8bb24a5a22..6cdf25fd26c3 100644
> --- a/drivers/base/node.c
> +++ b/drivers/base/node.c
> @@ -661,16 +661,16 @@ static int register_node(struct node *node, int num)
>  	node->dev.bus = &node_subsys;
>  	node->dev.release = node_device_release;
>  	node->dev.groups = node_dev_groups;
> -	error = device_register(&node->dev);
>  
> -	if (error)
> +	error = device_register(&node->dev);
> +	if (error) {
>  		put_device(&node->dev);
> -	else {
> -		hugetlb_register_node(node);
> -
> -		compaction_register_node(node);
> +		return error;
>  	}
> -	return error;
> +
> +	hugetlb_register_node(node);
> +	compaction_register_node(node);
> +	return 0;
>  }
>  
>  /**

Reviewed-by: David Hildenbrand <david@...hat.com>

-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ