Commit c863a2dc authored by Jules Irenge's avatar Jules Irenge Committed by Martin K. Petersen

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@playgroundSigned-off-by: default avatarJules Irenge <jbi.octave@gmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 6022f210
...@@ -3894,8 +3894,7 @@ int mpi3mr_init_ioc(struct mpi3mr_ioc *mrioc) ...@@ -3894,8 +3894,7 @@ int mpi3mr_init_ioc(struct mpi3mr_ioc *mrioc)
if (!mrioc->throttle_groups && mrioc->num_io_throttle_group) { if (!mrioc->throttle_groups && mrioc->num_io_throttle_group) {
dprint_init(mrioc, "allocating memory for throttle groups\n"); dprint_init(mrioc, "allocating memory for throttle groups\n");
sz = sizeof(struct mpi3mr_throttle_group_info); sz = sizeof(struct mpi3mr_throttle_group_info);
mrioc->throttle_groups = (struct mpi3mr_throttle_group_info *) mrioc->throttle_groups = kcalloc(mrioc->num_io_throttle_group, sz, GFP_KERNEL);
kcalloc(mrioc->num_io_throttle_group, sz, GFP_KERNEL);
if (!mrioc->throttle_groups) if (!mrioc->throttle_groups)
goto out_failed_noretry; goto out_failed_noretry;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment