]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net: ethernet: arc: Fix a potential memory leak if an optional regulator is deferred
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 18 Mar 2018 22:59:36 +0000 (23:59 +0100)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Mon, 2 Apr 2018 10:19:52 +0000 (07:19 -0300)
commit7756f8a222759397d400c8e1dd1e07b5d3f3988f
tree4b1cde7f414fac301f553dc10e72db3cb6872a52
parent7d43f31d30eb3eed2608de9a5be5663c510ec92c
net: ethernet: arc: Fix a potential memory leak if an optional regulator is deferred

BugLink: http://bugs.launchpad.net/bugs/1760585
[ Upstream commit 00777fac28ba3e126b9e63e789a613e8bd2cab25 ]

If the optional regulator is deferred, we must release some resources.
They will be re-allocated when the probe function will be called again.

Fixes: 6eacf31139bf ("ethernet: arc: Add support for Rockchip SoC layer device tree bindings")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/net/ethernet/arc/emac_rockchip.c