[PATCH 35/61] arch/mips: Prefer IS_ERR_OR_NULL over manual NULL check
From: Philipp Hahn
Date: Tue Mar 10 2026 - 08:49:24 EST
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: John Crispin <john@xxxxxxxxxxx>
To: Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>
Cc: linux-mips@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Signed-off-by: Philipp Hahn <phahn-oss@xxxxxx>
---
arch/mips/lantiq/clk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/lantiq/clk.c b/arch/mips/lantiq/clk.c
index 2d5a0bcb0cec156dc5f0daedbdd7c56ff8d62ca4..4ae271a887c39163370d070b49d9e5152a709bd7 100644
--- a/arch/mips/lantiq/clk.c
+++ b/arch/mips/lantiq/clk.c
@@ -60,7 +60,7 @@ EXPORT_SYMBOL_GPL(clk_get_ppe);
static inline int clk_good(struct clk *clk)
{
- return clk && !IS_ERR(clk);
+ return !IS_ERR_OR_NULL(clk);
}
unsigned long clk_get_rate(struct clk *clk)
--
2.43.0