aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorChristophe Ricard <christophe.ricard@gmail.com>2014-08-10 18:04:52 -0400
committerSamuel Ortiz <sameo@linux.intel.com>2014-09-07 18:04:21 -0400
commit72030a2eeb182575f1bf2383f1e9267d4a6ece61 (patch)
tree5ec80d22b3ab497a06d05ada659e5ec3872875ce /drivers/nfc
parent06ed3d607b1030365e6f4bdae193e64378e4264b (diff)
NFC: st21nfca: Change nfcid3 generation
nfcid3 is based on sensf_res value. target->sensf is never NULL as it is a table. Check the sensf_res_len instead to make sure sensf_res is set or not. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/st21nfca/st21nfca_dep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nfc/st21nfca/st21nfca_dep.c b/drivers/nfc/st21nfca/st21nfca_dep.c
index a62b6485cbbe..cd942c5adc53 100644
--- a/drivers/nfc/st21nfca/st21nfca_dep.c
+++ b/drivers/nfc/st21nfca/st21nfca_dep.c
@@ -523,7 +523,7 @@ int st21nfca_im_send_atr_req(struct nfc_hci_dev *hdev, u8 *gb, size_t gb_len)
523 memset(atr_req->nfcid3, 0, NFC_NFCID3_MAXSIZE); 523 memset(atr_req->nfcid3, 0, NFC_NFCID3_MAXSIZE);
524 target = hdev->ndev->targets; 524 target = hdev->ndev->targets;
525 525
526 if (target->sensf_res) 526 if (target->sensf_res_len > 0)
527 memcpy(atr_req->nfcid3, target->sensf_res, 527 memcpy(atr_req->nfcid3, target->sensf_res,
528 target->sensf_res_len); 528 target->sensf_res_len);
529 else 529 else