NFC: Fix SE discovery failure warning condition
authorSamuel Ortiz <sameo@linux.intel.com>
Wed, 24 Jul 2013 12:49:22 +0000 (14:49 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 13 Aug 2013 22:35:19 +0000 (00:35 +0200)
This is a typo coming from the initial implementation. se_discover fails
when it returns something different than zero and we should only display
a warning in that case.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/core.c

index 1d074dd..aad7f8f 100644 (file)
@@ -129,7 +129,7 @@ int nfc_dev_up(struct nfc_dev *dev)
        /* We have to enable the device before discovering SEs */
        if (dev->ops->discover_se) {
                rc = dev->ops->discover_se(dev);
-               if (!rc)
+               if (rc)
                        pr_warn("SE discovery failed\n");
        }