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

Borislav Petkov <[email protected]> Mon, 27 Jul 2026 18:37:25 -0700
Newsgroups org.kernel.vger.linux-edac,org.kernel.vger.linux-kernel
Message-ID <20260728013725.GBamgH1WcvOaEtAw4n@fat_crate.local>
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