From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Chen-Yu Tsai <wens@csie.org>, <netdev@vger.kernel.org>
Subject: Re: [PATCH] stmmac: Remove unbalanced clk_disable call
Date: Tue, 20 May 2014 12:08:36 +0200 [thread overview]
Message-ID: <537B29A4.1010100@st.com> (raw)
In-Reply-To: <1400578698-6407-1-git-send-email-hdegoede@redhat.com>
On 5/20/2014 11:38 AM, Hans de Goede wrote:
> The stmmac_open call was calling clk_disable_unprepare on phy init
> failure, but it never calls clk_prepare_enable, this causes
> a WARN_ON in the clk framework to trigger if for some reason phy init
> fails.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index d940034..0f4841d 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -1704,7 +1704,7 @@ static int stmmac_open(struct net_device *dev)
> if (ret) {
> pr_err("%s: Cannot attach to PHY (error: %d)\n",
> __func__, ret);
> - goto phy_error;
> + return ret;
> }
> }
>
> @@ -1779,8 +1779,6 @@ init_error:
> dma_desc_error:
> if (priv->phydev)
> phy_disconnect(priv->phydev);
> -phy_error:
> - clk_disable_unprepare(priv->stmmac_clk);
>
> return ret;
> }
>
next prev parent reply other threads:[~2014-05-20 10:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-20 9:38 [PATCH] stmmac: Remove unbalanced clk_disable call Hans de Goede
2014-05-20 10:08 ` Giuseppe CAVALLARO [this message]
2014-05-20 10:59 ` Chen-Yu Tsai
2014-05-22 19:11 ` David Miller
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=537B29A4.1010100@st.com \
--to=peppe.cavallaro@st.com \
--cc=hdegoede@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=wens@csie.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).