summaryrefslogtreecommitdiffstats
path: root/lib/sha1.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-05-10 16:12:42 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-08 08:49:01 +0200
commitded9137fcf0d729dbe65aa98c411352f40b22970 (patch)
treeaf5b7d52328286a4caa1b59ffa03c691dfee6b8f /lib/sha1.c
parent55bb5193cec58f8ffb73df6b8feb0d4b0ada53f4 (diff)
downloadlinux-stable-ded9137fcf0d729dbe65aa98c411352f40b22970.tar.gz
linux-stable-ded9137fcf0d729dbe65aa98c411352f40b22970.tar.bz2
linux-stable-ded9137fcf0d729dbe65aa98c411352f40b22970.zip
spi: Switch to signed types for *_native_cs SPI controller fields
commit 35f3f8504c3b60a1ae5576e178b27fc0ddd6157d upstream. 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> Signed-off-by: Nobuhiro Iwamatsu (CIP) <nobuhiro1.iwamatsu@toshiba.co.jp> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/sha1.c')
0 files changed, 0 insertions, 0 deletions