* [PATCH net-next] net/mlx5e: Remove a useless function call
@ 2023-05-29 8:34 Christophe JAILLET
2023-05-30 7:44 ` Simon Horman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Christophe JAILLET @ 2023-05-29 8:34 UTC (permalink / raw)
To: Saeed Mahameed, Leon Romanovsky, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, netdev, linux-rdma
'handle' is known to be NULL here. There is no need to kfree() it.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c
index 0290e0dea539..4e923a2874ae 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c
@@ -112,10 +112,8 @@ mlx5e_tc_post_act_add(struct mlx5e_post_act *post_act, struct mlx5_flow_attr *po
int err;
handle = kzalloc(sizeof(*handle), GFP_KERNEL);
- if (!handle) {
- kfree(handle);
+ if (!handle)
return ERR_PTR(-ENOMEM);
- }
post_attr->chain = 0;
post_attr->prio = 0;
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net/mlx5e: Remove a useless function call
2023-05-29 8:34 [PATCH net-next] net/mlx5e: Remove a useless function call Christophe JAILLET
@ 2023-05-30 7:44 ` Simon Horman
2023-05-30 7:51 ` Tariq Toukan
2023-05-31 22:07 ` Saeed Mahameed
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2023-05-30 7:44 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Saeed Mahameed, Leon Romanovsky, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, linux-kernel, kernel-janitors,
netdev, linux-rdma
On Mon, May 29, 2023 at 10:34:59AM +0200, Christophe JAILLET wrote:
> 'handle' is known to be NULL here. There is no need to kfree() it.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net/mlx5e: Remove a useless function call
2023-05-29 8:34 [PATCH net-next] net/mlx5e: Remove a useless function call Christophe JAILLET
2023-05-30 7:44 ` Simon Horman
@ 2023-05-30 7:51 ` Tariq Toukan
2023-05-31 22:07 ` Saeed Mahameed
2 siblings, 0 replies; 4+ messages in thread
From: Tariq Toukan @ 2023-05-30 7:51 UTC (permalink / raw)
To: Christophe JAILLET, Saeed Mahameed, Leon Romanovsky,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: linux-kernel, kernel-janitors, netdev, linux-rdma
On 29/05/2023 11:34, Christophe JAILLET wrote:
> 'handle' is known to be NULL here. There is no need to kfree() it.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c
> index 0290e0dea539..4e923a2874ae 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc/post_act.c
> @@ -112,10 +112,8 @@ mlx5e_tc_post_act_add(struct mlx5e_post_act *post_act, struct mlx5_flow_attr *po
> int err;
>
> handle = kzalloc(sizeof(*handle), GFP_KERNEL);
> - if (!handle) {
> - kfree(handle);
> + if (!handle)
> return ERR_PTR(-ENOMEM);
> - }
>
> post_attr->chain = 0;
> post_attr->prio = 0;
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Thanks for your patch.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] net/mlx5e: Remove a useless function call
2023-05-29 8:34 [PATCH net-next] net/mlx5e: Remove a useless function call Christophe JAILLET
2023-05-30 7:44 ` Simon Horman
2023-05-30 7:51 ` Tariq Toukan
@ 2023-05-31 22:07 ` Saeed Mahameed
2 siblings, 0 replies; 4+ messages in thread
From: Saeed Mahameed @ 2023-05-31 22:07 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Saeed Mahameed, Leon Romanovsky, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, linux-kernel, kernel-janitors,
netdev, linux-rdma
On 29 May 10:34, Christophe JAILLET wrote:
>'handle' is known to be NULL here. There is no need to kfree() it.
>
>Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Applied to net-next-mlx5.
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-31 22:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-29 8:34 [PATCH net-next] net/mlx5e: Remove a useless function call Christophe JAILLET
2023-05-30 7:44 ` Simon Horman
2023-05-30 7:51 ` Tariq Toukan
2023-05-31 22:07 ` Saeed Mahameed
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.