Skip to content
Commit a577d868 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by David S. Miller
Browse files

net/mlx4_en: Fix an error handling path in 'mlx4_en_init_netdev()'

If an error occurs, 'mlx4_en_destroy_netdev()' is called.
It then calls 'mlx4_en_free_resources()' which does the needed resources
cleanup.

So, doing some explicit kfree in the error handling path would lead to
some double kfree.

Simplify code to avoid such a case.

Fixes: 67f8b1dc

 ("net/mlx4_en: Refactor the XDP forwarding rings scheme")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarTariq Toukan <tariqt@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 97f3efb6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment