summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2022-12-18 19:08:40 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-18 11:30:33 +0100
commit2df9d1275418a450142c32b5b14f3030cd9094f3 (patch)
treef62cdfb7ce2fd8db753182c2c87002a430dd8410
parent72d778f688c960cd11fe784e522b39f1a9db77f0 (diff)
downloadlinux-stable-2df9d1275418a450142c32b5b14f3030cd9094f3.tar.gz
linux-stable-2df9d1275418a450142c32b5b14f3030cd9094f3.tar.bz2
linux-stable-2df9d1275418a450142c32b5b14f3030cd9094f3.zip
myri10ge: Fix an error handling path in myri10ge_probe()
[ Upstream commit d83b950d44d2982c0e62e3d81b0f35ab09431008 ] 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: 0dcffac1a329 ("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>
-rw-r--r--drivers/net/ethernet/myricom/myri10ge/myri10ge.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
index 3bc570c46f81..8296b0aa42a9 100644
--- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
+++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c
@@ -3960,6 +3960,7 @@ abort_with_slices:
myri10ge_free_slices(mgp);
abort_with_firmware:
+ kfree(mgp->msix_vectors);
myri10ge_dummy_rdma(mgp, 0);
abort_with_ioremap: