]> git.baikalelectronics.ru Git - kernel.git/commit
nfc: s3fwrn5: use signed integer for parsing GPIO numbers
authorKrzysztof Kozlowski <krzk@kernel.org>
Mon, 23 Nov 2020 16:23:51 +0000 (17:23 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 24 Nov 2020 23:00:53 +0000 (15:00 -0800)
commit4117f351ae768e4ff884ea77ac0efca4376130c3
treef52e3235335dfebb5e6fe6595d1ca8b8bafd7e7b
parent8a5bfd5825c5e4b2b44ce14d049c6895ffe02aa1
nfc: s3fwrn5: use signed integer for parsing GPIO numbers

GPIOs - as returned by of_get_named_gpio() and used by the gpiolib - are
signed integers, where negative number indicates error.  The return
value of of_get_named_gpio() should not be assigned to an unsigned int
because in case of !CONFIG_GPIOLIB such number would be a valid GPIO.

Fixes: 44e3e91fe104 ("nfc: s3fwrn5: Add driver for Samsung S3FWRN5 NFC Chip")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201123162351.209100-1-krzk@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/nfc/s3fwrn5/i2c.c