From: Hongbo Li Date: Wed, 28 Aug 2024 12:24:50 +0000 (+0800) Subject: lsm: Use IS_ERR_OR_NULL() helper function X-Git-Tag: v6.12-rc1~198^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ce4a60592ee03e8f6900bf9bf2a6108cd1a9903c;p=thirdparty%2Flinux.git 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 Signed-off-by: Paul Moore --- diff --git a/security/inode.c b/security/inode.c index f21847badb7d8..da3ab44c8e571 100644 --- a/security/inode.c +++ b/security/inode.c @@ -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);