[PATCH 48/61] mtd: Prefer IS_ERR_OR_NULL over manual NULL check

Richard Weinberger richard at nod.at
Fri Mar 13 06:33:42 AEDT 2026


----- Ursprüngliche Mail -----
> Von: "Philipp Hahn" <phahn-oss at avm.de>
> -	if (gpiomtd->nwp && !IS_ERR(gpiomtd->nwp))
> +	if (!IS_ERR_OR_NULL(gpiomtd->nwp))

No, please don't.

This makes reading the code not easier.

Thanks,
//richard


More information about the Linux-erofs mailing list