提交 858ce022 编写于 作者: T Thierry Escande 提交者: Samuel Ortiz

NFC: pn533: Fix bad allocation size

Use dereferenced pointer in sizeof instead of pointer itself.
Signed-off-by: NThierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 fb97c3e8
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册