]> git.baikalelectronics.ru Git - kernel.git/commit
net: bcmgenet: Fix a resource leak in an error handling path in the probe functin
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 12 Dec 2020 18:20:05 +0000 (19:20 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 16 Dec 2020 19:04:24 +0000 (11:04 -0800)
commitca4bcc82a31e1e282fb7c375e76c219847420aee
treee02144fbdc0ebfbd41145a6c64cec50bbeefc476
parentad8eece1c7b1a961ca56e372a0e3229906f466d8
net: bcmgenet: Fix a resource leak in an error handling path in the probe functin

If the 'register_netdev()' call fails, we must undo a previous
'bcmgenet_mii_init()' call.

Fixes: 390dff99da87 ("net: bcmgenet: add main driver file")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20201212182005.120437-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/genet/bcmgenet.c