Commit ce4a6059 authored by Hongbo Li's avatar Hongbo Li Committed by Paul Moore

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: default avatarHongbo Li <lihongbo22@huawei.com>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent d6bd12e8
...@@ -296,7 +296,7 @@ void securityfs_remove(struct dentry *dentry) ...@@ -296,7 +296,7 @@ void securityfs_remove(struct dentry *dentry)
{ {
struct inode *dir; struct inode *dir;
if (!dentry || IS_ERR(dentry)) if (IS_ERR_OR_NULL(dentry))
return; return;
dir = d_inode(dentry->d_parent); dir = d_inode(dentry->d_parent);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment