]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
NFC: Fix secure element state check
authorArron Wang <arron.wang@intel.com>
Tue, 30 Jul 2013 12:35:35 +0000 (14:35 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 13 Aug 2013 23:13:38 +0000 (01:13 +0200)
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>
net/nfc/core.c

index d252912b8debd302df30adbfc06507a84a3f6dac..ee1fe66e2c8ac7550aeb524b3ee91519603474bd 100644 (file)
@@ -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;
        }