mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
This commit is contained in:
parent
4eba11e82a
commit
2c3832834b
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue