From: Arron Wang Date: Tue, 30 Jul 2013 12:35:35 +0000 (+0200) Subject: NFC: Fix secure element state check X-Git-Tag: MMI-PSA29.97-13-9~13727^2~84^2^2~108^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2c3832834b95e0226da1d13229472978f78462c5;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: Samuel Ortiz --- 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; }