NFC: fdp: Detect errors from fdp_nci_create_conn()
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sun, 5 Jun 2016 09:17:10 +0000 (11:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Oct 2016 13:23:44 +0000 (15:23 +0200)
commitc5f519610b9636e6abee78c54e85ecb46dcc9b49
treef634dc77488086b9890959c82d9b4402c02ee5e0
parent868b3ee358d20140da2a2225c0e98da69ff742dd
NFC: fdp: Detect errors from fdp_nci_create_conn()

commit fa1ce54ea38f7f83473fce62e64fefbd7ebd170e upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nfc/fdp/fdp.c