myri10ge: Fix an error handling path in myri10ge_probe()

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: 0dcffac1a3 ("myri10ge: add multislices support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Christophe JAILLET 2022-12-18 19:08:40 +01:00 коммит произвёл David S. Miller
Родитель 10073399cb
Коммит d83b950d44
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -3912,6 +3912,7 @@ abort_with_slices:
myri10ge_free_slices(mgp);
abort_with_firmware:
kfree(mgp->msix_vectors);
myri10ge_dummy_rdma(mgp, 0);
abort_with_ioremap: