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)
commit104eb270e665f4fcd8cb8c8ab4c4d4538c604e92
tree14d46ad4b54ace2e94fd27be1cb49e30ce15a26e
parente754ec69ab69601420eb2ed58ece803d77c93f61
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