Skip to content

Commit

Permalink
lsm: Use IS_ERR_OR_NULL() helper function
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Paul Moore <[email protected]>
  • Loading branch information
Hongbo Li authored and pcmoore committed Aug 29, 2024
1 parent d6bd12e commit ce4a605
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ce4a605

Please sign in to comment.