]> git.baikalelectronics.ru Git - kernel.git/commit
myri10ge: Fix an error handling path in myri10ge_probe()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 18 Dec 2022 18:08:40 +0000 (19:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:33 +0000 (11:41 +0100)
commitd3a3210358edc6b712319f9b0fd77108464e38b5
treeb79b435c22b19419708838fe284df60de6283619
parentb426735155f195107c32dc343a79e456d4d219e7
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: 8fdfa5a90e64 ("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>
drivers/net/ethernet/myricom/myri10ge/myri10ge.c