Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Hongbo Li and committed by
Paul Moore
ce4a6059 d6bd12e8

+1 -1
+1 -1
security/inode.c
··· 296 296 { 297 297 struct inode *dir; 298 298 299 - if (!dentry || IS_ERR(dentry)) 299 + if (IS_ERR_OR_NULL(dentry)) 300 300 return; 301 301 302 302 dir = d_inode(dentry->d_parent);