Skip to content

Commit d8f0a86

Browse files
krzkkuba-moo
authored andcommitted
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: c04c674 ("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>
1 parent 078eb55 commit d8f0a86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/nfc/s3fwrn5/i2c.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ struct s3fwrn5_i2c_phy {
2626
struct i2c_client *i2c_dev;
2727
struct nci_dev *ndev;
2828

29-
unsigned int gpio_en;
30-
unsigned int gpio_fw_wake;
29+
int gpio_en;
30+
int gpio_fw_wake;
3131

3232
struct mutex mutex;
3333

0 commit comments

Comments
 (0)