Skip to contentSkip to conversation

hpsa: Remove unnessary cast

PATCH In review Firo Yang 1 participant 1 message Apr 23, 2015

Subsystems (3)
lore
Share & tools
lore

Firo Yang

author
#0 lore raw

PATCH v2 11/15 hpsa: Remove unnessary cast

kmalloc() returns a void pointer - no need to cast it in drivers/scsi/hpsa.c::hpsa_big_passthru_ioctl()

---
 drivers/scsi/hpsa.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/scsi/hpsa.c +1 -2
index 8eab107..e7d3444b 100644
@@ -4992,8 +4992,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;
Signature · 1 line
2.1.0