spi: pxa2xx: Validate the correctness of the SSP type
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 21 Oct 2022 19:00:15 +0000 (22:00 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 24 Oct 2022 12:30:15 +0000 (13:30 +0100)
commit88a947215c29aa49307c8cd0638ba54e4cf07391
treefd4c29a049386be788afb918cbd726e22e1a11ab
parent4194dabe8ca2e6b61d12181dccf4fd1e60302e42
spi: pxa2xx: Validate the correctness of the SSP type

Currently we blindly apply the SSP type value from any source of the
information. Increase robustness by validating the value before use.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221021190018.63646-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-pxa2xx.c
include/linux/pxa2xx_ssp.h