Re: [PATCH] spi: wpcm-fiu: Fix potential NULL pointer dereference in wpcm_fiu_probe()

From: Markus Elfring

Date: Fri Feb 13 2026 - 03:54:39 EST


> platform_get_resource_byname() can return NULL, which would cause a crash
> when passed the pointer to resource_size().
>
> Move the fiu->memory_size assignment after the error check for
> devm_ioremap_resource() to prevent the potential NULL pointer dereference.

Were any source code analysis tools involved here?

Regards,
Markus