Skip to content

Commit ce4a605

Browse files
Hongbo Lipcmoore
authored andcommitted
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 <[email protected]> Signed-off-by: Paul Moore <[email protected]>
1 parent d6bd12e commit ce4a605

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ void securityfs_remove(struct dentry *dentry)
296296
{
297297
struct inode *dir;
298298

299-
if (!dentry || IS_ERR(dentry))
299+
if (IS_ERR_OR_NULL(dentry))
300300
return;
301301

302302
dir = d_inode(dentry->d_parent);

0 commit comments

Comments
 (0)