[PATCH v4 03/16] spi: s3c64xx: avoid possible negative array index

Peter Griffin peter.griffin at linaro.org
Mon Feb 5 07:26:48 PST 2024


On Mon, 5 Feb 2024 at 12:45, Tudor Ambarus <tudor.ambarus at linaro.org> wrote:
>
> 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.
>
> Fixes: 2b90807549e5 ("spi: s3c64xx: add device tree support")
> Reviewed-by: Sam Protsenko <semen.protsenko at linaro.org>
> Signed-off-by: Tudor Ambarus <tudor.ambarus at linaro.org>
> ---

Reviewed-by: Peter Griffin <peter.griffin at linaro.org>



More information about the linux-arm-kernel mailing list