mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 04:04:26 +08:00
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>
This commit is contained in:
parent
d6bd12e80b
commit
ce4a60592e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user