[soc:board-remove 200/200] drivers/mmc/host/sdhci-pxav2.c:318 sdhci_pxav2_probe() error: we previously assumed 'variant' could be null (see line 305)
Arnd Bergmann
arnd at arndb.de
Wed Aug 19 04:02:09 PDT 2026
On Wed, Aug 19, 2026, at 09:54, Dan Carpenter wrote:
> dfe9746aed2d12 Doug Brown 2023-01-16 304 variant =
> of_device_get_match_data(dev);
> dfe9746aed2d12 Doug Brown 2023-01-16 @305 if (variant)
>
> This assumes "variant" can be NULL.
>
> dfe9746aed2d12 Doug Brown 2023-01-16 319 host->ops =
> variant->ops;
>
> But later it's dereferenced without checking.
>
Hi Dan,
Thanks for the report! I've fixed it up now, by removing the (now)
pointless NULL check.
As you may have seen, there are a lot of changes in this branch,
and I assume there are still many things that smatch will find here
as it is still work in progress.
If you have a list of possible regressions that smatch has already
found on this branch, I'd be happy to look through the raw data
for actual bugs and fix them before you spend a lot of time
processing the findings.
Arnd
More information about the linux-arm-kernel
mailing list