]> git.baikalelectronics.ru Git - kernel.git/commit
mdio-sun4i: Fix a memory leak
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 6 Jan 2018 08:00:09 +0000 (09:00 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Jan 2018 19:30:28 +0000 (14:30 -0500)
commitc1cf66ab2d59568cc32709a0bc05747c5b2b40b0
tree62dfcbad2bd329ed2413f987165f8a05dfac8bce
parente5cdcd621db9ad840e1433cec108a211310d4964
mdio-sun4i: Fix a memory leak

If the probing of the regulator is deferred, the memory allocated by
'mdiobus_alloc_size()' will be leaking.
It should be freed before the next call to 'sun4i_mdio_probe()' which will
reallocate it.

Fixes: b778e58859d5 ("net: Add MDIO bus driver for the Allwinner EMAC")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio-sun4i.c