提交 19be606b 编写于 作者: J Javier Martinez Canillas 提交者: Martin K. Petersen

scsi: hpsa: Remove unneeded void pointer cast

It's not necessary to cast the result of kmalloc, since void pointers
are promoted to any other type. This also fixes following coccinelle
warning:

casting value returned by memory allocation function to (BIG_IOCTL_Command_struct *) is useless.
Signed-off-by: NJavier Martinez Canillas <javier@osg.samsung.com>
Acked-by: NDon Brace <don.brace@microsemi.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 4e6f767d
......@@ -6657,8 +6657,7 @@ static int hpsa_big_passthru_ioctl(struct ctlr_info *h, void __user *argp)
return -EINVAL;
if (!capable(CAP_SYS_RAWIO))
return -EPERM;
ioc = (BIG_IOCTL_Command_struct *)
kmalloc(sizeof(*ioc), GFP_KERNEL);
ioc = kmalloc(sizeof(*ioc), GFP_KERNEL);
if (!ioc) {
status = -ENOMEM;
goto cleanup1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册