mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
net/mlx5: Fix check for allocation failure in comp_irqs_request_pci()
This function accidentally dereferences "cpus" instead of returning
directly.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/r/202305200354.KV3jU94w-lkp@intel.com/
Fixes: b48a0f72bc ("net/mlx5: Refactor completion irq request/release code")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
fe5c2d3aef
commit
d5972f1000
|
|
@ -824,7 +824,7 @@ static int comp_irqs_request_pci(struct mlx5_core_dev *dev)
|
|||
ncomp_eqs = table->num_comp_eqs;
|
||||
cpus = kcalloc(ncomp_eqs, sizeof(*cpus), GFP_KERNEL);
|
||||
if (!cpus)
|
||||
ret = -ENOMEM;
|
||||
return -ENOMEM;
|
||||
|
||||
i = 0;
|
||||
rcu_read_lock();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user