diff --git a/net/nfc/nci/hci.c b/net/nfc/nci/hci.c index 2aedac15cb592353de7bb2ab8ec3ebb91bd5325a..a0ab26d535dca7492facc16f7aa11796732d685a 100644 --- a/net/nfc/nci/hci.c +++ b/net/nfc/nci/hci.c @@ -676,7 +676,7 @@ int nci_hci_connect_gate(struct nci_dev *ndev, break; default: pipe = nci_hci_create_pipe(ndev, dest_host, dest_gate, &r); - if (pipe < 0) + if (pipe == NCI_HCI_INVALID_PIPE) return r; pipe_created = true; break;