Skip to content
Unverified Commit a336d41b authored by Tudor Ambarus's avatar Tudor Ambarus Committed by Mark Brown
Browse files

spi: s3c64xx: avoid possible negative array index



The platform id is used as an index into the fifo_lvl_mask array.
Platforms can come with a negative device ID, PLATFORM_DEVID_NONE (-1),
thus we risked a negative array index. Catch such cases and fail to
probe.

Reviewed-by: default avatarSam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: default avatarPeter Griffin <peter.griffin@linaro.org>
Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@linaro.org>
Link: https://lore.kernel.org/r/20240207120431.2766269-6-tudor.ambarus@linaro.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7256d6bd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment