[PATCH 12/61] quota: Prefer IS_ERR_OR_NULL over manual NULL check
Philipp Hahn <[email protected]>
| Newsgroups | gmane.linux.ports.sh.devel |
|---|---|
| Message-ID | <20260310-b4-is_err_or_null-v1-12-bd63b656022d__5447.69082205079$1773145056$gmane$org@avm.de> |
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL check. Change generated with coccinelle. To: Jan Kara <[email protected]> Cc: [email protected] Signed-off-by: Philipp Hahn <[email protected]> --- 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