Re: [PATCH 56/61] clk: Prefer IS_ERR_OR_NULL over manual NULL check
From: Brian Masney
Date: Tue Mar 10 2026 - 10:35:54 EST
On Tue, Mar 10, 2026 at 12:49:22PM +0100, Philipp Hahn wrote:
> Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
> check.
>
> Semantich change: Previously the code only printed the warning on error,
Semantic ...
> but not when the pointer was NULL. Now the warning is printed in both
> cases!
>
> Change found with coccinelle.
>
> To: Michael Turquette <mturquette@xxxxxxxxxxxx>
> To: Stephen Boyd <sboyd@xxxxxxxxxx>
> To: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
> To: Thomas Gleixner <tglx@xxxxxxxxxx>
> Cc: linux-clk@xxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx
> Signed-off-by: Philipp Hahn <phahn-oss@xxxxxx>
With the minor typo addressed:
Reviewed-by: Brian Masney <bmasney@xxxxxxxxxx>