[PATCH 56/61] clk: Prefer IS_ERR_OR_NULL over manual NULL check
Brian Masney
bmasney at redhat.com
Tue Mar 10 06:21:58 PDT 2026
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 at baylibre.com>
> To: Stephen Boyd <sboyd at kernel.org>
> To: Daniel Lezcano <daniel.lezcano at kernel.org>
> To: Thomas Gleixner <tglx at kernel.org>
> Cc: linux-clk at vger.kernel.org
> Cc: linux-kernel at vger.kernel.org
> Signed-off-by: Philipp Hahn <phahn-oss at avm.de>
With the minor typo addressed:
Reviewed-by: Brian Masney <bmasney at redhat.com>
More information about the Linux-rockchip
mailing list