]> git.baikalelectronics.ru Git - kernel.git/commit
net: sun4i-emac: Properly free resources on probe failure and remove
authorHans de Goede <hdegoede@redhat.com>
Tue, 20 Oct 2015 08:42:24 +0000 (10:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Oct 2015 02:47:45 +0000 (19:47 -0700)
commitec6d04f553f474128274a285fb0cdb2528dcd235
tree14d46ad4b54ace2e94fd27be1cb49e30ce15a26e
parentce038dfc57c5766cf3094abb91dd884b936aafb1
net: sun4i-emac: Properly free resources on probe failure and remove

Fix sun4i-emac not releasing the following resources:
-iomapped memory not released on probe-failure nor on remove
-clock not getting disabled on probe-failure nor on remove
-sram not being released on remove

And while at it also add error checking to the clk_prepare_enable call
done on probe.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/allwinner/sun4i-emac.c