diff options
author | Hongbo Li <lihongbo22@huawei.com> | 2024-08-28 14:24:50 +0200 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2024-08-29 17:12:13 +0200 |
commit | ce4a60592ee03e8f6900bf9bf2a6108cd1a9903c (patch) | |
tree | 6a39883f7b8da1ea8385d0c1f122f484fe9f5579 /security | |
parent | lsm: remove LSM_COUNT and LSM_CONFIG_COUNT (diff) | |
download | linux-ce4a60592ee03e8f6900bf9bf2a6108cd1a9903c.tar.xz linux-ce4a60592ee03e8f6900bf9bf2a6108cd1a9903c.zip |
lsm: Use IS_ERR_OR_NULL() helper function
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>
Diffstat (limited to 'security')
-rw-r--r-- | security/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/inode.c b/security/inode.c index f21847badb7d..da3ab44c8e57 100644 --- 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); |