Re: [PATCH 1/9] EDAC/versalnet: Add NULL check for mci in handle_error()

From: Borislav Petkov

Date: Mon Jul 27 2026 - 21:40:11 EST


On Mon, Jul 27, 2026 at 12:18:48PM +0530, Pandey, Radhey Shyam wrote:
> The gap in the driver is that init_one_mc() returns success without
> setting priv->mci[i] when the bus width decodes to DEV_UNKNOWN, while
> buggy firmware / future firmware rpmsg error path can still calls
> handle_error().

Aha, right, so I missed that. So the right fix is to always return an error if
the function fails. So that the proper unwinding in init_versalnet() works.

> Happy to drop the check if you prefer otherwise we can keep it as a
> cheap guard for a firmware/driver mismatch.

You already have that at the beginning of handle_error().

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette