summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJules Irenge <jbi.octave@gmail.com>2022-09-12 22:29:11 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2022-09-25 14:22:56 -0400
commitc863a2dcb9b0894d9ac6030c4d1ab2e7867dabcb (patch)
treef0f951d5ea2aa4373ffa7ffcbb7dbeb0deeb6b70 /drivers/scsi
parent6022f210461fef67e6e676fd8544ca02d1bcfa7a (diff)
downloadlinux-c863a2dcb9b0894d9ac6030c4d1ab2e7867dabcb.tar.bz2
scsi: mpi3mr: Remove unnecessary cast
coccinelle reports a warning: WARNING: casting value returned by memory allocation function to (struct mpi3mr_throttle_group_info *) is useless To fix this, the unnecessary cast is removed. Link: https://lore.kernel.org/r/Yx+kp8NxHvDHs7dv@playground Signed-off-by: Jules Irenge <jbi.octave@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/mpi3mr/mpi3mr_fw.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
index d5da49a0d544..0c4aabaefdcc 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
@@ -3894,8 +3894,7 @@ retry_init:
if (!mrioc->throttle_groups && mrioc->num_io_throttle_group) {
dprint_init(mrioc, "allocating memory for throttle groups\n");
sz = sizeof(struct mpi3mr_throttle_group_info);
- mrioc->throttle_groups = (struct mpi3mr_throttle_group_info *)
- kcalloc(mrioc->num_io_throttle_group, sz, GFP_KERNEL);
+ mrioc->throttle_groups = kcalloc(mrioc->num_io_throttle_group, sz, GFP_KERNEL);
if (!mrioc->throttle_groups)
goto out_failed_noretry;
}