Commit 98b3ac1b authored by Samuel Ortiz's avatar Samuel Ortiz Committed by John W. Linville

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: default avatarSamuel Ortiz <sameo@linux.intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 1762c17c
...@@ -904,6 +904,8 @@ static int pn533_target_found(struct pn533 *dev, ...@@ -904,6 +904,8 @@ static int pn533_target_found(struct pn533 *dev,
if (resp->tg != 1) if (resp->tg != 1)
return -EPROTO; return -EPROTO;
memset(&nfc_tgt, 0, sizeof(struct nfc_target));
target_data_len = resp_len - sizeof(struct pn533_poll_response); target_data_len = resp_len - sizeof(struct pn533_poll_response);
switch (dev->poll_mod_curr) { switch (dev->poll_mod_curr) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment