Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758038AbbDWPli (ORCPT ); Thu, 23 Apr 2015 11:41:38 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:42021 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756661AbbDWPlg (ORCPT ); Thu, 23 Apr 2015 11:41:36 -0400 Date: Thu, 23 Apr 2015 11:41:31 -0400 (EDT) Message-Id: <20150423.114131.1358383687413246843.davem@davemloft.net> To: niklas.cassel@axis.com Cc: f.fainelli@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, johan@kernel.org, niklass@axis.com Subject: Re: [PATCH] net: phy: micrel: don't do clock-mode-select if we got NULL clock From: David Miller In-Reply-To: <1429796231-8542-1-git-send-email-niklass@axis.com> References: <1429796231-8542-1-git-send-email-niklass@axis.com> X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 23 Apr 2015 08:41:36 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1116 Lines: 32 From: Niklas Cassel Date: Thu, 23 Apr 2015 15:37:11 +0200 > Signed-off-by: Niklas Cassel > --- > drivers/net/phy/micrel.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c > index 1190fd8..a422036 100644 > --- a/drivers/net/phy/micrel.c > +++ b/drivers/net/phy/micrel.c > @@ -548,7 +548,7 @@ static int kszphy_probe(struct phy_device *phydev) > } > > clk = devm_clk_get(&phydev->dev, "rmii-ref"); > - if (!IS_ERR(clk)) { > + if (!IS_ERR_OR_NULL(clk)) { > unsigned long rate = clk_get_rate(clk); > bool rmii_ref_clk_sel_25_mhz; > I do not see anyone in any other networking driver checking for a NULL return from devm_clk_get(). So either everyone else is wrong, or your change is. I want to find out which before applying anything. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/