[PATCH] ARM: Orion: fix driver probe error handling with respect to clk
Andrew Lunn
andrew at lunn.ch
Thu Jul 19 02:37:36 EDT 2012
On Thu, Jul 19, 2012 at 12:04:09AM +0200, Simon Baatz wrote:
> The clk patches added code to get and enable clocks in the
> respective driver probe functions. If the probe function failed
> for some reason after enabling the clock, the clock was not
> disabled again in many cases.
>
> Signed-off-by: Simon Baatz <gmbnomis at gmail.com>
Hi Simon
Looks mostly good. I can pull this into my collection of orion
patches.
> diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
> index f0f06b2..c496720 100644
> --- a/drivers/net/ethernet/marvell/mv643xx_eth.c
> +++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
> @@ -2983,6 +2983,10 @@ static int mv643xx_eth_probe(struct platform_device *pdev)
> return 0;
>
> out:
> + if (!IS_ERR(mp->clk)) {
> + clk_disable_unprepare(mp->clk);
> + clk_put(mp->clk);
> + }
> free_netdev(dev);
>
> return err;
The ethernet driver is build on platforms which don't have clk
support. So this needs to be inside
#if defined(CONFIG_HAVE_CLK)
#endif
I will add this.
Andrew
More information about the linux-arm-kernel
mailing list