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]
Message-ID: <20250729165659.GJ222315@ZenIV>
Date: Tue, 29 Jul 2025 17:56:59 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: Xichao Zhao <zhao.xichao@...o.com>
Cc: gregkh@...uxfoundation.org, arve@...roid.com, tkjos@...roid.com,
	maco@...roid.com, joelagnelf@...dia.com, brauner@...nel.org,
	cmllamas@...gle.com, surenb@...gle.com,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] binderfs: Use PTR_ERR_OR_ZERO() to simplify code

On Tue, Jul 29, 2025 at 05:37:04PM +0800, Xichao Zhao wrote:
> Use the standard error pointer macro to shorten the code and simplify.
> 
> Signed-off-by: Xichao Zhao <zhao.xichao@...o.com>
> ---
>  drivers/android/binderfs.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/android/binderfs.c b/drivers/android/binderfs.c
> index 0d9d95a7fb60..729e3ed94b89 100644
> --- a/drivers/android/binderfs.c
> +++ b/drivers/android/binderfs.c
> @@ -598,10 +598,8 @@ static int init_binder_features(struct super_block *sb)
>  	dentry = binderfs_create_file(dir, "freeze_notification",
>  				      &binder_features_fops,
>  				      &binder_features.freeze_notification);
> -	if (IS_ERR(dentry))
> -		return PTR_ERR(dentry);
>  
> -	return 0;
> +	return PTR_ERR_OR_ZERO(dentry);
>  }

NAK.  Take a look at the failure exits before this one; keeping them
consistent is a good thing.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ