Skip to content

Commit

Permalink
scsi: mpi3mr: Remove unnecessary cast
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
irenge authored and martinkpetersen committed Sep 25, 2022
1 parent 6022f21 commit c863a2d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/scsi/mpi3mr/mpi3mr_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -3894,8 +3894,7 @@ int mpi3mr_init_ioc(struct mpi3mr_ioc *mrioc)
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;
}
Expand Down

0 comments on commit c863a2d

Please sign in to comment.