[PATCH] binderfs: Use PTR_ERR_OR_ZERO() to simplify code
From: Xichao Zhao
Date: Tue Jul 29 2025 - 05:38:03 EST
Use the standard error pointer macro to shorten the code and simplify.
Signed-off-by: Xichao Zhao <zhao.xichao@xxxxxxxx>
---
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