diff options
author | Zheng Yongjun <zhengyongjun3@huawei.com> | 2020-12-30 09:18:35 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-01-06 01:01:02 +0100 |
commit | 8407b23199b073249fd2056ec18d7cbb74a47534 (patch) | |
tree | af693e0a17426c0b3d4703acb9e3228ca84bbcc8 | |
parent | Merge tag 'mlx5-updates-2021-01-05' of git://git.kernel.org/pub/scm/linux/ker... (diff) | |
download | linux-8407b23199b073249fd2056ec18d7cbb74a47534.tar.xz linux-8407b23199b073249fd2056ec18d7cbb74a47534.zip |
net/mlxfw: Use kzalloc for allocating only one thing
Use kzalloc rather than kcalloc(1,...)
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
@@
- kcalloc(1,
+ kzalloc(
...)
// </smpl>
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c b/drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c index 5d9ddf36fb4e..e6f677e42007 100644 --- a/drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c +++ b/drivers/net/ethernet/mellanox/mlxfw/mlxfw_mfa2.c @@ -267,7 +267,7 @@ struct mlxfw_mfa2_file *mlxfw_mfa2_file_init(const struct firmware *fw) const void *first_tlv_ptr; const void *cb_top_ptr; - mfa2_file = kcalloc(1, sizeof(*mfa2_file), GFP_KERNEL); + mfa2_file = kzalloc(sizeof(*mfa2_file), GFP_KERNEL); if (!mfa2_file) return ERR_PTR(-ENOMEM); |