aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2012-03-04 19:03:39 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-06 15:16:21 -0500
commit98b3ac1b980b0c0ffff24fda8d13ab8c216df4d1 (patch)
treeef6e1af19ec07b7bcb5b32531647285a47e33493
parent1762c17c9c38ed21090bee8cd02e2b470c5c2308 (diff)
NFC: Clear pn533 target structure
The polled target structure should be memset to 0 in order to avoid sel_res and sens_res garbage. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/nfc/pn533.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nfc/pn533.c b/drivers/nfc/pn533.c
index 8be0ae626d73..a5766042f0ee 100644
--- a/drivers/nfc/pn533.c
+++ b/drivers/nfc/pn533.c
@@ -904,6 +904,8 @@ static int pn533_target_found(struct pn533 *dev,
904 if (resp->tg != 1) 904 if (resp->tg != 1)
905 return -EPROTO; 905 return -EPROTO;
906 906
907 memset(&nfc_tgt, 0, sizeof(struct nfc_target));
908
907 target_data_len = resp_len - sizeof(struct pn533_poll_response); 909 target_data_len = resp_len - sizeof(struct pn533_poll_response);
908 910
909 switch (dev->poll_mod_curr) { 911 switch (dev->poll_mod_curr) {