Skip to content

Commit fa1ce54

Browse files
geertuSamuel Ortiz
authored andcommitted
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: a06347c ("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>
1 parent 6d2f70c commit fa1ce54

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/nfc/fdp/fdp.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ static int fdp_nci_patch_otp(struct nci_dev *ndev)
353353
{
354354
struct fdp_nci_info *info = nci_get_drvdata(ndev);
355355
struct device *dev = &info->phy->i2c_dev->dev;
356-
u8 conn_id;
356+
int conn_id;
357357
int r = 0;
358358

359359
if (info->otp_version >= info->otp_patch_version)
@@ -424,7 +424,7 @@ static int fdp_nci_patch_ram(struct nci_dev *ndev)
424424
{
425425
struct fdp_nci_info *info = nci_get_drvdata(ndev);
426426
struct device *dev = &info->phy->i2c_dev->dev;
427-
u8 conn_id;
427+
int conn_id;
428428
int r = 0;
429429

430430
if (info->ram_version >= info->ram_patch_version)

0 commit comments

Comments
 (0)