Skip to content

Commit

Permalink
NFC: Clear pn533 target structure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Samuel Ortiz authored and John W. Linville committed Mar 6, 2012
1 parent 1762c17 commit 98b3ac1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/nfc/pn533.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,8 @@ static int pn533_target_found(struct pn533 *dev,
if (resp->tg != 1)
return -EPROTO;

memset(&nfc_tgt, 0, sizeof(struct nfc_target));

target_data_len = resp_len - sizeof(struct pn533_poll_response);

switch (dev->poll_mod_curr) {
Expand Down

0 comments on commit 98b3ac1

Please sign in to comment.