[PATCH 57/61] reset: Prefer IS_ERR_OR_NULL over manual NULL check

Philipp Zabel p.zabel at pengutronix.de
Tue Mar 10 05:43:30 PDT 2026


Hi Philipp,

On Di, 2026-03-10 at 12:49 +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,
> but not when the pointer was NULL. Now the warning is printed in both
> cases!

No, rstc == NULL is valid (for optional reset controls) and must not
throw a warning.


regards
Philipp



More information about the Linux-rockchip mailing list