NFC: nci: fix mistake in uart generic driver
authorVincent Cuissard <cuissard@marvell.com>
Mon, 15 Jun 2015 15:34:23 +0000 (17:34 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 15 Jun 2015 16:10:37 +0000 (18:10 +0200)
It was not possible to register a UART driver due
to a bad condition.

Signed-off-by: Vincent Cuissard <cuissard@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/nci/uart.c

index 2c48810..21d8875 100644 (file)
@@ -417,7 +417,7 @@ int nci_uart_register(struct nci_uart *nu)
                nu->ops.recv = nci_uart_default_recv;
 
        /* Add this driver in the driver list */
-       if (!nci_uart_drivers[nu->driver]) {
+       if (nci_uart_drivers[nu->driver]) {
                pr_err("driver %d is already registered\n", nu->driver);
                return -EBUSY;
        }