提交 e6c5abf2 编写于 作者: F Fengguang Wu 提交者: Greg Kroah-Hartman

staging: ced1401: remove useless value cast on kmalloc()

Casting value returned by k[cmz]alloc to (struct page * *) is useless.

Generated by: scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci
Reported-by: NFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 c2a6a552
......@@ -697,8 +697,7 @@ static int SetArea(DEVICE_EXTENSION * pdx, int nArea, char __user * puBuf,
return -EFAULT; // ...then we are done
// Now allocate space to hold the page pointer and virtual address pointer tables
pPages =
(struct page **)kmalloc(len * sizeof(struct page *), GFP_KERNEL);
pPages = kmalloc(len * sizeof(struct page *), GFP_KERNEL);
if (!pPages) {
iReturn = U14ERR_NOMEMORY;
goto error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册