summaryrefslogtreecommitdiffstats
path: root/net/nfc
diff options
context:
space:
mode:
authorArron Wang <arron.wang@intel.com>2013-07-30 14:35:35 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2013-08-14 01:13:38 +0200
commit2c3832834b95e0226da1d13229472978f78462c5 (patch)
tree5f16b5adf632c737abd395428b33f23140751547 /net/nfc
parent4eba11e82a0365117be92453c5c91a263500fd1a (diff)
downloadblackbird-op-linux-2c3832834b95e0226da1d13229472978f78462c5.tar.gz
blackbird-op-linux-2c3832834b95e0226da1d13229472978f78462c5.zip
NFC: Fix secure element state check
Another typo from the initial commit where we check for the secure element type field instead of its state when enabling or disabling it. Signed-off-by: Arron Wang <arron.wang@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc')
-rw-r--r--net/nfc/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/nfc/core.c b/net/nfc/core.c
index d252912b8deb..ee1fe66e2c8a 100644
--- a/net/nfc/core.c
+++ b/net/nfc/core.c
@@ -583,7 +583,7 @@ int nfc_enable_se(struct nfc_dev *dev, u32 se_idx)
goto error;
}
- if (se->type == NFC_SE_ENABLED) {
+ if (se->state == NFC_SE_ENABLED) {
rc = -EALREADY;
goto error;
}
@@ -626,7 +626,7 @@ int nfc_disable_se(struct nfc_dev *dev, u32 se_idx)
goto error;
}
- if (se->type == NFC_SE_DISABLED) {
+ if (se->state == NFC_SE_DISABLED) {
rc = -EALREADY;
goto error;
}
OpenPOWER on IntegriCloud