diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-11-14 22:42:46 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-11-14 23:02:33 +0100 |
commit | 757ec116c9bce4278fa4423039736c832cc63b6f (patch) | |
tree | 663a89d21ba00dc1a003be334e5e067b9e44936b /drivers/rtc/rtc-v3020.c | |
parent | spi: npcm: add NPCM PSPI controller driver (diff) | |
download | linux-757ec116c9bce4278fa4423039736c832cc63b6f.tar.xz linux-757ec116c9bce4278fa4423039736c832cc63b6f.zip |
spi: npcm: fix u32 csgpio being checked for less than zero
The u32 variable csgpio is being checked for an error return
from the call to of_get_named_gpio, however, since this is unsigned
this comparison will always be false. Fix this by making csgpio an
int and fix up the %u format specifiers to %d accordingly.
Detected by CoverityScan, CID#1475476 ("Unsigned compared against 0")
Fixes: 2a22f1b30cee ("spi: npcm: add NPCM PSPI controller driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/rtc/rtc-v3020.c')
0 files changed, 0 insertions, 0 deletions