diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-05-10 16:12:42 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-05-11 12:05:40 +0300 |
commit | 35f3f8504c3b60a1ae5576e178b27fc0ddd6157d (patch) | |
tree | 6dee89c63bf85022af15a4a2a739ff3f3a2cbf3b /drivers | |
parent | dc5fa590273890a8541ce6e999d606bfb2d73797 (diff) | |
download | linux-35f3f8504c3b60a1ae5576e178b27fc0ddd6157d.tar.xz |
spi: Switch to signed types for *_native_cs SPI controller fields
While fixing undefined behaviour the commit f60d7270c8a3 ("spi: Avoid
undefined behaviour when counting unused native CSs") missed the case
when all CSs are GPIOs and thus unused_native_cs will be evaluated to
-1 in unsigned representation. This will falsely trigger a condition
in the spi_get_gpio_descs().
Switch to signed types for *_native_cs SPI controller fields to fix above.
Fixes: f60d7270c8a3 ("spi: Avoid undefined behaviour when counting unused native CSs")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210510131242.49455-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions