diff options
| author | Felix Gu <ustc.gu@gmail.com> | 2026-02-12 20:41:40 +0800 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-02-13 17:08:24 +0000 |
| commit | 888a0a802c467bbe34a42167bdf9d7331333440a (patch) | |
| tree | c41f97beac1ed5c62e13cc1a2dddc4aa08bc0d37 /scripts/split-man | |
| parent | 5af56f30c4fcbade4a92f94dadfea517d1db9703 (diff) | |
spi: wpcm-fiu: Fix potential NULL pointer dereference in wpcm_fiu_probe()
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>
Diffstat (limited to 'scripts/split-man')
0 files changed, 0 insertions, 0 deletions
