Skip to content
Commit f13d4e18 authored by Marek Vasut's avatar Marek Vasut Committed by Mark Brown
Browse files

spi: imx: Gracefully handle NULL master->cs_gpios



It is possible that master->cs_gpios is NULL after spi_bitbang_start(),
this happens if the master has no CS GPIOs specified in DT. Check for
this case after spi_bitbang_start() to prevent NULL pointer dereference
in the subsequent for loop, which accesses the master->cs_gpios field.

Signed-off-by: default avatarMarek Vasut <marex@denx.de>
Cc: Martin Kaiser <martin@kaiser.cx>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 15ca9215
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment