]> git.baikalelectronics.ru Git - kernel.git/commit
NFC: nci: Fix error check of nci_hci_create_pipe() result
authorChristophe Ricard <christophe.ricard@gmail.com>
Wed, 23 Dec 2015 22:45:15 +0000 (23:45 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 29 Dec 2015 18:06:18 +0000 (19:06 +0100)
commit9dc9edf176b8bdca7fb8091e15c6a38c37d6d4df
tree8f03600f3864673771c01f2e4ea798a1f8c99de9
parent008823bef192267f1205f62e24657e4d3d4c8895
NFC: nci: Fix error check of nci_hci_create_pipe() result

net/nfc/nci/hci.c: In function nci_hci_connect_gate :
net/nfc/nci/hci.c:679: warning: comparison is always false due to limited range of data type

In case of error, nci_hci_create_pipe() returns NCI_HCI_INVALID_PIPE,
and not a negative error code.

Correct the check to fix this.

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/nci/hci.c