diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2016-06-05 12:17:10 +0300 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2016-07-04 13:17:56 +0300 |
commit | fa1ce54ea38f7f83473fce62e64fefbd7ebd170e (patch) | |
tree | 590997ce18718aa9f457b99f5c673637ff44fb6b /drivers/nfc/fdp/fdp.c | |
parent | 6d2f70cae481a2e8e85a244d3b2d36828dadff83 (diff) | |
download | linux-fa1ce54ea38f7f83473fce62e64fefbd7ebd170e.tar.xz |
NFC: fdp: Detect errors from fdp_nci_create_conn()
drivers/nfc/fdp/fdp.c: In function ‘fdp_nci_patch_otp’:
drivers/nfc/fdp/fdp.c:373: warning: comparison is always false due to limited range of data type
drivers/nfc/fdp/fdp.c: In function ‘fdp_nci_patch_ram’:
drivers/nfc/fdp/fdp.c:444: warning: comparison is always false due to limited range of data type
fdp_nci_create_conn() may return a negative error code, which is
silently ignored by assigning it to a u8.
Change conn_id from u8 to int to fix this.
Fixes: a06347c04c13e380 ("NFC: Add Intel Fields Peak NFC solution driver")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc/fdp/fdp.c')
-rw-r--r-- | drivers/nfc/fdp/fdp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nfc/fdp/fdp.c b/drivers/nfc/fdp/fdp.c index d93d3145365f..7c1eaea3b685 100644 --- a/drivers/nfc/fdp/fdp.c +++ b/drivers/nfc/fdp/fdp.c @@ -353,7 +353,7 @@ static int fdp_nci_patch_otp(struct nci_dev *ndev) { struct fdp_nci_info *info = nci_get_drvdata(ndev); struct device *dev = &info->phy->i2c_dev->dev; - u8 conn_id; + int conn_id; int r = 0; if (info->otp_version >= info->otp_patch_version) @@ -424,7 +424,7 @@ static int fdp_nci_patch_ram(struct nci_dev *ndev) { struct fdp_nci_info *info = nci_get_drvdata(ndev); struct device *dev = &info->phy->i2c_dev->dev; - u8 conn_id; + int conn_id; int r = 0; if (info->ram_version >= info->ram_patch_version) |