提交 4a73bb48 编写于 作者: G Gustavo A. R. Silva 提交者: Greg Kroah-Hartman

staging: ccree: use sizeof(*var) in kmalloc

Fix the following checkpatch warning:

CHECK: Prefer kmalloc(sizeof(*buff_mgr_handle)...)
over kmalloc(sizeof(struct buff_mgr_handle)...)
Signed-off-by: NGustavo A. R. Silva <garsilva@embeddedor.com>
Acked-by: NGilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 60ba7c7c
......@@ -1725,7 +1725,7 @@ int ssi_buffer_mgr_init(struct ssi_drvdata *drvdata)
struct buff_mgr_handle *buff_mgr_handle;
struct device *dev = &drvdata->plat_dev->dev;
buff_mgr_handle = kmalloc(sizeof(struct buff_mgr_handle), GFP_KERNEL);
buff_mgr_handle = kmalloc(sizeof(*buff_mgr_handle), GFP_KERNEL);
if (!buff_mgr_handle)
return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册