[PATCH 12/61] quota: Prefer IS_ERR_OR_NULL over manual NULL check
Philipp Hahn
phahn-oss at avm.de
Tue Mar 10 04:48:38 PDT 2026
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Jan Kara <jack at suse.com>
Cc: linux-kernel at vger.kernel.org
Signed-off-by: Philipp Hahn <phahn-oss at avm.de>
---
fs/quota/quota.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/quota/quota.c b/fs/quota/quota.c
index 33bacd70758007129e0375bab44d7431195ec441..2e09fc247d0cf45b9e83a4f8a0be7ea694c8c2a1 100644
--- a/fs/quota/quota.c
+++ b/fs/quota/quota.c
@@ -965,7 +965,7 @@ SYSCALL_DEFINE4(quotactl, unsigned int, cmd, const char __user *, special,
else
drop_super_exclusive(sb);
out:
- if (pathp && !IS_ERR(pathp))
+ if (!IS_ERR_OR_NULL(pathp))
path_put(pathp);
return ret;
}
--
2.43.0
More information about the Linux-rockchip
mailing list