mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-23 14:24:25 +08:00
net/mlx5: use kvfree() for memory allocated with kvzalloc()
It is allocated with kvzalloc(), the corresponding release function should not be kfree(), use kvfree() instead. Generated by: scripts/coccinelle/api/kfree_mismatch.cocci Signed-off-by: Junlin Yang <yangjunlin@yulong.com> Reviewed-by: Roi Dayan <roid@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
cc82a2e6c8
commit
ad2c99ca75
@ -248,7 +248,7 @@ err_mod_hdr_regc0:
|
||||
err_ethertype:
|
||||
kfree(rule);
|
||||
out:
|
||||
kfree(rule_spec);
|
||||
kvfree(rule_spec);
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -328,7 +328,7 @@ static int mlx5_create_indir_recirc_group(struct mlx5_eswitch *esw,
|
||||
e->recirc_cnt = 0;
|
||||
|
||||
out:
|
||||
kfree(in);
|
||||
kvfree(in);
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -347,7 +347,7 @@ static int mlx5_create_indir_fwd_group(struct mlx5_eswitch *esw,
|
||||
|
||||
spec = kvzalloc(sizeof(*spec), GFP_KERNEL);
|
||||
if (!spec) {
|
||||
kfree(in);
|
||||
kvfree(in);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@ -371,8 +371,8 @@ static int mlx5_create_indir_fwd_group(struct mlx5_eswitch *esw,
|
||||
}
|
||||
|
||||
err_out:
|
||||
kfree(spec);
|
||||
kfree(in);
|
||||
kvfree(spec);
|
||||
kvfree(in);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user