1
0
Fork 0

nfc: s3fwrn5: use signed integer for parsing GPIO numbers

[ Upstream commit d8f0a86795 ]

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: c04c674fad ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
5.4-rM2-2.2.x-imx-squashed
Krzysztof Kozlowski 2020-11-23 17:23:51 +01:00 committed by Greg Kroah-Hartman
parent 1a831f889d
commit 7869696d6c
1 changed files with 2 additions and 2 deletions

View File

@ -26,8 +26,8 @@ struct s3fwrn5_i2c_phy {
struct i2c_client *i2c_dev;
struct nci_dev *ndev;
unsigned int gpio_en;
unsigned int gpio_fw_wake;
int gpio_en;
int gpio_fw_wake;
struct mutex mutex;