NFC: Fix SE discovery failure warning condition
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>
diff --git a/net/nfc/core.c b/net/nfc/core.c
index 1d074dd..aad7f8f 100644
--- a/net/nfc/core.c
+++ b/net/nfc/core.c
@@ -129,7 +129,7 @@
/* 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");
}