mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] binderfs: Use PTR_ERR_OR_ZERO() to simplify code
@ 2025-07-29  9:37 Xichao Zhao
  2025-07-29 16:56 ` Al Viro
  0 siblings, 1 reply; 2+ messages in thread
From: Xichao Zhao @ 2025-07-29  9:37 UTC (permalink / raw)
  To: gregkh, arve, tkjos, maco, joelagnelf, brauner, cmllamas, surenb
  Cc: linux-kernel, Xichao Zhao

Use the standard error pointer macro to shorten the code and simplify.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.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);
 }
 
 static int init_binder_logs(struct super_block *sb)
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-29 16:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-29  9:37 [PATCH] binderfs: Use PTR_ERR_OR_ZERO() to simplify code Xichao Zhao
2025-07-29 16:56 ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®