• Chen-Yu Tsai's avatar
    stmmac: dwmac-sunxi: Call exit cleanup function in probe error path · d856c16d
    Chen-Yu Tsai authored
    dwmac-sunxi has 2 callbacks that were called from stmmac_platform as
    part of the probe and remove sequences.
    
    Ater the conversion of dwmac-sunxi into a standalone platform driver,
    the .init function is called before calling into the stmmac driver
    core, but .exit is not called to clean up if stmmac returns an error.
    
    This patch fixes the probe error path. This properly cleans up and
    releases resources when the driver core fails to probe.
    
    Cc: Joachim Eastwood <manabian@gmail.com>
    Fixes: 9a9e9a1e ("stmmac: dwmac-sunxi: turn setup callback into a
    		      probe function")
    Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    d856c16d
dwmac-sunxi.c 4.62 KB