diff options
author | Javier Martinez Canillas <javier@osg.samsung.com> | 2016-10-13 13:10:08 -0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-11-08 17:29:48 -0500 |
commit | 19be606be1df35479333bd04e2cdaddc9d77e38c (patch) | |
tree | 01c7ac1836fa1861adf9ba7b88b692f8367502c0 /drivers/scsi/hpsa.c | |
parent | 4e6f767dba1c9a7279b3b24694cdf3b73e00f722 (diff) | |
download | blackbird-op-linux-19be606be1df35479333bd04e2cdaddc9d77e38c.tar.gz blackbird-op-linux-19be606be1df35479333bd04e2cdaddc9d77e38c.zip |
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: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r-- | drivers/scsi/hpsa.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index d007ec18179a..4e82b692298e 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -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; |