From: Christophe JAILLET Date: Sun, 18 Dec 2022 18:08:40 +0000 (+0100) Subject: myri10ge: Fix an error handling path in myri10ge_probe() X-Git-Tag: v6.1.8~1042 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=70c8fcab6bf205c104987908cc6a421fcf572649;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- diff --git a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c index 9063e2e..9a9341a 100644 --- a/drivers/net/ethernet/myricom/myri10ge/myri10ge.c +++ b/drivers/net/ethernet/myricom/myri10ge/myri10ge.c @@ -3913,6 +3913,7 @@ abort_with_slices: myri10ge_free_slices(mgp); abort_with_firmware: + kfree(mgp->msix_vectors); myri10ge_dummy_rdma(mgp, 0); abort_with_ioremap: