Skip to content

Commit

Permalink
myri10ge: Fix an error handling path in myri10ge_probe()
Browse files Browse the repository at this point in the history
[ Upstream commit d83b950 ]

Some memory allocated in myri10ge_probe_slices() is not released in the
error handling path of myri10ge_probe().

Add the corresponding kfree(), as already done in the remove function.

Fixes: 0dcffac ("myri10ge: add multislices support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
tititiou36 authored and gregkh committed Dec 31, 2022
1 parent 1ec0a7d commit f474262
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/myricom/myri10ge/myri10ge.c
Expand Up @@ -3923,6 +3923,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
myri10ge_free_slices(mgp);

abort_with_firmware:
kfree(mgp->msix_vectors);
myri10ge_dummy_rdma(mgp, 0);

abort_with_ioremap:
Expand Down

0 comments on commit f474262

Please sign in to comment.