Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c383283 authored by Arron Wang's avatar Arron Wang Committed by Samuel Ortiz
Browse files

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: default avatarArron Wang <arron.wang@intel.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 4eba11e8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
	}