diff options
| author | Felix Gu <ustc.gu@gmail.com> | 2026-02-12 20:41:40 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-02-26 14:59:43 -0800 |
| commit | 0f93a80eb3fd596ddc5730d05e0e8c88e1aa2891 (patch) | |
| tree | 3afa73d19e56a5d8fca655770947a3d7b14b95a2 /include/net/aligned_data.h | |
| parent | 263e28add4f4472cfa95150d218955d1945aa413 (diff) | |
spi: wpcm-fiu: Fix potential NULL pointer dereference in wpcm_fiu_probe()
[ Upstream commit 888a0a802c467bbe34a42167bdf9d7331333440a ]
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.
Fixes: 9838c182471e ("spi: wpcm-fiu: Add direct map support")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Reviewed-by: J. Neuschäfer <j.ne@posteo.net>
Link: https://patch.msgid.link/20260212-wpcm-v1-1-5b7c4f526aac@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/net/aligned_data.h')
0 files changed, 0 insertions, 0 deletions
