NFC: fdp: Detect errors from fdp_nci_create_conn()
commitfa1ce54ea38f7f83473fce62e64fefbd7ebd170e
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sun, 5 Jun 2016 09:17:10 +0000 (5 11:17 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 4 Jul 2016 10:17:56 +0000 (4 12:17 +0200)
tree590997ce18718aa9f457b99f5c673637ff44fb6b
parent6d2f70cae481a2e8e85a244d3b2d36828dadff83
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>
drivers/nfc/fdp/fdp.c