Re: [PATCH] perf/x86/amd/uncore: fix error codes in amd_uncore_init()

From: Ingo Molnar
Date: Mon Oct 16 2023 - 07:18:22 EST



* Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:

> The surprising thing is the Clang doesn't detect the bug either. It's
> strange. (I found this bug with Smatch).

Yeah, that's weird and kind of concerning. I don't think either compiler is
able to see that the init function return values are always ignored. I had
to dig into init/main.c to convince myself.

> Also I notice that my Fixes tag wasn't correct either. That patch did
> have a missing error code bug, but "ret" was set to zero. :/

Yeah, so I left the Fixes tag out of the commit anyway, because this isn't
really a fix that -stable should concern itself with. After the first
commit it's not even a fix per se, but an improvement in the resolution &
meaning of error codes or so.

Thanks,

Ingo