From: Christophe Ricard Date: Sun, 10 Aug 2014 22:04:52 +0000 (+0200) Subject: NFC: st21nfca: Change nfcid3 generation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=72030a2eeb182575f1bf2383f1e9267d4a6ece61;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: Samuel Ortiz --- 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) memset(atr_req->nfcid3, 0, NFC_NFCID3_MAXSIZE); target = hdev->ndev->targets; - if (target->sensf_res) + if (target->sensf_res_len > 0) memcpy(atr_req->nfcid3, target->sensf_res, target->sensf_res_len); else