mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
mlxsw: spectrum: Add missing error code on allocation failure
We accidentally return success if the kmalloc_array() call fails.
Fixes: 0e14c7777a
("mlxsw: spectrum: Add the multicast routing hardware logic")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Yotam Gigi <yotamg@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b508e0b6e4
commit
b5c7d4e54c
@ -771,8 +771,10 @@ mlxsw_sp_mr_tcam_region_init(struct mlxsw_sp *mlxsw_sp,
|
||||
|
||||
parman_prios = kmalloc_array(MLXSW_SP_MR_ROUTE_PRIO_MAX + 1,
|
||||
sizeof(*parman_prios), GFP_KERNEL);
|
||||
if (!parman_prios)
|
||||
if (!parman_prios) {
|
||||
err = -ENOMEM;
|
||||
goto err_parman_prios_alloc;
|
||||
}
|
||||
mr_tcam_region->parman_prios = parman_prios;
|
||||
|
||||
for (i = 0; i < MLXSW_SP_MR_ROUTE_PRIO_MAX + 1; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user