projects
/
linux
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d6bd12e
)
lsm: Use IS_ERR_OR_NULL() helper function
author
Hongbo Li
<lihongbo22@huawei.com>
Wed, 28 Aug 2024 12:24:50 +0000
(20:24 +0800)
committer
Paul Moore
<paul@paul-moore.com>
Thu, 29 Aug 2024 15:12:13 +0000
(11:12 -0400)
Use the IS_ERR_OR_NULL() helper instead of open-coding a
NULL and an error pointer checks to simplify the code and
improve readability.
Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/inode.c
patch
|
blob
|
history
diff --git
a/security/inode.c
b/security/inode.c
index f21847badb7d8ee8c4e790a363f241b27b29d1c2..da3ab44c8e571f5e1e10fc892ce6883ee924e93f 100644
(file)
--- a/
security/inode.c
+++ b/
security/inode.c
@@
-296,7
+296,7
@@
void securityfs_remove(struct dentry *dentry)
{
struct inode *dir;
- if (
!dentry || IS_ERR
(dentry))
+ if (
IS_ERR_OR_NULL
(dentry))
return;
dir = d_inode(dentry->d_parent);