diff options
author | Shradha Gupta <shradhagupta@linux.microsoft.com> | 2024-06-14 09:19:08 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-06-18 03:01:01 +0200 |
commit | e275e19c918b502aa4534e56dc2e25b5095e9005 (patch) | |
tree | c1fa0c22971f1fea5c84c6acdf6816585af32f19 /drivers/net | |
parent | fou: remove warn in gue_gro_receive on unsupported protocol (diff) | |
download | linux-e275e19c918b502aa4534e56dc2e25b5095e9005.tar.xz linux-e275e19c918b502aa4534e56dc2e25b5095e9005.zip |
net: mana: Use mana_cleanup_port_context() for rxq cleanup
To cleanup rxqs in port context structures, instead of duplicating the
code, use existing function mana_cleanup_port_context() which does
the exact cleanup that's needed.
Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Wei Liu <wei.liu@kernel.org>
Reviewed-by: Heng Qi <hengqi@linux.alibaba.com>
Link: https://lore.kernel.org/r/1718349548-28697-1-git-send-email-shradhagupta@linux.microsoft.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/microsoft/mana/mana_en.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c index b89ad4afd66e..93e526e5dd16 100644 --- a/drivers/net/ethernet/microsoft/mana/mana_en.c +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c @@ -2529,8 +2529,7 @@ static int mana_init_port(struct net_device *ndev) return 0; reset_apc: - kfree(apc->rxqs); - apc->rxqs = NULL; + mana_cleanup_port_context(apc); return err; } @@ -2787,8 +2786,7 @@ static int mana_probe_port(struct mana_context *ac, int port_idx, free_indir: mana_cleanup_indir_table(apc); reset_apc: - kfree(apc->rxqs); - apc->rxqs = NULL; + mana_cleanup_port_context(apc); free_net: *ndev_storage = NULL; netdev_err(ndev, "Failed to probe vPort %d: %d\n", port_idx, err); |