From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Orion: fix driver probe error handling with respect to clk
Date: Thu, 19 Jul 2012 08:37:36 +0200 [thread overview]
Message-ID: <20120719063736.GT4015@lunn.ch> (raw)
In-Reply-To: <1342649049-3956-1-git-send-email-gmbnomis@gmail.com>
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@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
prev parent reply other threads:[~2012-07-19 6:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-18 22:04 [PATCH] ARM: Orion: fix driver probe error handling with respect to clk Simon Baatz
2012-07-19 6:37 ` Andrew Lunn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120719063736.GT4015@lunn.ch \
--to=andrew@lunn.ch \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.