netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: phy: micrel: don't do clock-mode-select if we got NULL clock
@ 2015-04-23 13:37 Niklas Cassel
  2015-04-23 15:41 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Niklas Cassel @ 2015-04-23 13:37 UTC (permalink / raw)
  To: f.fainelli; +Cc: netdev, linux-kernel, johan, Niklas Cassel

Signed-off-by: Niklas Cassel <niklass@axis.com>
---
 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;
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: phy: micrel: don't do clock-mode-select if we got NULL clock
  2015-04-23 13:37 [PATCH] net: phy: micrel: don't do clock-mode-select if we got NULL clock Niklas Cassel
@ 2015-04-23 15:41 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-04-23 15:41 UTC (permalink / raw)
  To: niklas.cassel; +Cc: f.fainelli, netdev, linux-kernel, johan, niklass

From: Niklas Cassel <niklas.cassel@axis.com>
Date: Thu, 23 Apr 2015 15:37:11 +0200

> Signed-off-by: Niklas Cassel <niklass@axis.com>
> ---
>  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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-23 15:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-23 13:37 [PATCH] net: phy: micrel: don't do clock-mode-select if we got NULL clock Niklas Cassel
2015-04-23 15:41 ` David Miller

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).