All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 11/15] scsi: kzalloc() returns void pointer, no need to cast in hpsa driver
@ 2015-04-23  5:34 Firo Yang
  0 siblings, 0 replies; only message in thread
From: Firo Yang @ 2015-04-23  5:34 UTC (permalink / raw)
  To: kernel-janitors

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

Signed-off-by: Firo Yang <firogm@gmail.com>
---
 drivers/scsi/hpsa.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 8eab107..e7d3444b 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -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;
-- 
2.1.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-04-23  5:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-23  5:34 [PATCH 11/15] scsi: kzalloc() returns void pointer, no need to cast in hpsa driver Firo Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.