projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb97c3e
)
NFC: pn533: Fix bad allocation size
author
Thierry Escande
<
[email protected]
>
Sat, 12 Jan 2013 18:37:12 +0000
(19:37 +0100)
committer
Samuel Ortiz
<
[email protected]
>
Sun, 13 Jan 2013 22:22:09 +0000
(23:22 +0100)
Use dereferenced pointer in sizeof instead of pointer itself.
Signed-off-by: Thierry Escande <
[email protected]
>
Signed-off-by: Samuel Ortiz <
[email protected]
>
drivers/nfc/pn533.c
patch
|
blob
|
history
diff --git
a/drivers/nfc/pn533.c
b/drivers/nfc/pn533.c
index f1702f9457019968f227bf9a52bf96e6ea8d4837..f696318cfb512eb80c70623ee4e9d23edf27abbf 100644
(file)
--- 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,
nfc_dev_dbg(&dev->interface->dev, "Sending command 0x%x", cmd_code);
- arg = kzalloc(sizeof(arg), GFP_KERNEL);
+ arg = kzalloc(sizeof(
*
arg), GFP_KERNEL);
if (!arg)
return -ENOMEM;
@@
-863,7
+863,7
@@
static int pn533_send_cmd_direct_async(struct pn533 *dev, u8 cmd_code,
if (!resp)
return -ENOMEM;
- arg = kzalloc(sizeof(arg), GFP_KERNEL);
+ arg = kzalloc(sizeof(
*
arg), GFP_KERNEL);
if (!arg) {
dev_kfree_skb(resp);
return -ENOMEM;