提交 617a0c71 编写于 作者: A anish kumar 提交者: Greg Kroah-Hartman

Staging: sm7xx: preferred form for passing a size to memory allocation routines

The preferred form for passing a size of a struct is the following:
p = kmalloc(sizeof(*p), ...);
Please refer Documentation/Codingstyle chapter 14
Signed-off-by: Nanish kumar <anish198519851985@gmail.com>
Acked-by: NHarry Wei <harryxiyou@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 1639c8ab
......@@ -714,7 +714,7 @@ static struct smtcfb_info *smtc_alloc_fb_info(struct pci_dev *dev,
{
struct smtcfb_info *sfb;
sfb = kzalloc(sizeof(struct smtcfb_info), GFP_KERNEL);
sfb = kzalloc(sizeof(*sfb), GFP_KERNEL);
if (!sfb)
return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册