]> git.baikalelectronics.ru Git - kernel.git/commit
net: mscc: ocelot: Fix a resource leak in the error handling path of the probe function
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 13 Dec 2020 11:48:38 +0000 (12:48 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 16 Dec 2020 19:11:24 +0000 (11:11 -0800)
commit072498f4f6addd6a3e4d26ff9427b88d947b1b1a
treef637f3759ef0b9fabc6df6f6d0b69acbbf5faa68
parentc4b220fcefae50f43bd9f38d3e4fdd98447f8f98
net: mscc: ocelot: Fix a resource leak in the error handling path of the probe function

In case of error after calling 'ocelot_init()', it must be undone by a
corresponding 'ocelot_deinit()' call, as already done in the remove
function.

Fixes: 1bed22a67906 ("net: mscc: Add initial Ocelot switch support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20201213114838.126922-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mscc/ocelot_vsc7514.c