diff options
author | Thierry Escande <thierry.escande@linux.intel.com> | 2013-01-12 13:37:12 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-01-13 17:22:09 -0500 |
commit | 858ce0220922a52e009d17dcaaab5dfd76f9833b (patch) | |
tree | de5cf54ace3b1553aa47a775574695f75433b16f /drivers/nfc | |
parent | fb97c3e80f99988079df4fb5f3c84aea4e7f806a (diff) |
NFC: pn533: Fix bad allocation size
Use dereferenced pointer in sizeof instead of pointer itself.
Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc')
-rw-r--r-- | drivers/nfc/pn533.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nfc/pn533.c b/drivers/nfc/pn533.c index f1702f945701..f696318cfb51 100644 --- a/drivers/nfc/pn533.c +++ b/drivers/nfc/pn533.c | |||
@@ -743,7 +743,7 @@ static int __pn533_send_async(struct pn533 *dev, u8 cmd_code, | |||
743 | 743 | ||
744 | nfc_dev_dbg(&dev->interface->dev, "Sending command 0x%x", cmd_code); | 744 | nfc_dev_dbg(&dev->interface->dev, "Sending command 0x%x", cmd_code); |
745 | 745 | ||
746 | arg = kzalloc(sizeof(arg), GFP_KERNEL); | 746 | arg = kzalloc(sizeof(*arg), GFP_KERNEL); |
747 | if (!arg) | 747 | if (!arg) |
748 | return -ENOMEM; | 748 | return -ENOMEM; |
749 | 749 | ||
@@ -863,7 +863,7 @@ static int pn533_send_cmd_direct_async(struct pn533 *dev, u8 cmd_code, | |||
863 | if (!resp) | 863 | if (!resp) |
864 | return -ENOMEM; | 864 | return -ENOMEM; |
865 | 865 | ||
866 | arg = kzalloc(sizeof(arg), GFP_KERNEL); | 866 | arg = kzalloc(sizeof(*arg), GFP_KERNEL); |
867 | if (!arg) { | 867 | if (!arg) { |
868 | dev_kfree_skb(resp); | 868 | dev_kfree_skb(resp); |
869 | return -ENOMEM; | 869 | return -ENOMEM; |