netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: phy: smsc: fix clk error handling
@ 2021-01-11  8:59 Marco Felsch
  2021-01-11 14:17 ` Andrew Lunn
  0 siblings, 1 reply; 3+ messages in thread
From: Marco Felsch @ 2021-01-11  8:59 UTC (permalink / raw)
  To: andrew, hkallweit1, linux, davem, kuba
  Cc: f.fainelli, netdev, linux-kernel, kernel

Commit bedd8d78aba3 ("net: phy: smsc: LAN8710/20: add phy refclk in
support") added the phy clk support. The commit already checks if
clk_get_optional() throw an error but instead of returning the error it
ignores it.

Fixes: bedd8d78aba3 ("net: phy: smsc: LAN8710/20: add phy refclk in support")
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
 drivers/net/phy/smsc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
index 0fc39ac5ca88..10722fed666d 100644
--- a/drivers/net/phy/smsc.c
+++ b/drivers/net/phy/smsc.c
@@ -284,7 +284,8 @@ static int smsc_phy_probe(struct phy_device *phydev)
 	/* Make clk optional to keep DTB backward compatibility. */
 	priv->refclk = clk_get_optional(dev, NULL);
 	if (IS_ERR(priv->refclk))
-		dev_err_probe(dev, PTR_ERR(priv->refclk), "Failed to request clock\n");
+		return dev_err_probe(dev, PTR_ERR(priv->refclk),
+				     "Failed to request clock\n");
 
 	ret = clk_prepare_enable(priv->refclk);
 	if (ret)
-- 
2.20.1


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

* Re: [PATCH] net: phy: smsc: fix clk error handling
  2021-01-11  8:59 [PATCH] net: phy: smsc: fix clk error handling Marco Felsch
@ 2021-01-11 14:17 ` Andrew Lunn
  2021-01-13  2:40   ` Jakub Kicinski
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2021-01-11 14:17 UTC (permalink / raw)
  To: Marco Felsch
  Cc: hkallweit1, linux, davem, kuba, f.fainelli, netdev, linux-kernel, kernel

On Mon, Jan 11, 2021 at 09:59:32AM +0100, Marco Felsch wrote:
> Commit bedd8d78aba3 ("net: phy: smsc: LAN8710/20: add phy refclk in
> support") added the phy clk support. The commit already checks if
> clk_get_optional() throw an error but instead of returning the error it
> ignores it.
> 
> Fixes: bedd8d78aba3 ("net: phy: smsc: LAN8710/20: add phy refclk in support")
> Suggested-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH] net: phy: smsc: fix clk error handling
  2021-01-11 14:17 ` Andrew Lunn
@ 2021-01-13  2:40   ` Jakub Kicinski
  0 siblings, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2021-01-13  2:40 UTC (permalink / raw)
  To: Andrew Lunn, Marco Felsch
  Cc: hkallweit1, linux, davem, f.fainelli, netdev, linux-kernel, kernel

On Mon, 11 Jan 2021 15:17:05 +0100 Andrew Lunn wrote:
> On Mon, Jan 11, 2021 at 09:59:32AM +0100, Marco Felsch wrote:
> > Commit bedd8d78aba3 ("net: phy: smsc: LAN8710/20: add phy refclk in
> > support") added the phy clk support. The commit already checks if
> > clk_get_optional() throw an error but instead of returning the error it
> > ignores it.
> > 
> > Fixes: bedd8d78aba3 ("net: phy: smsc: LAN8710/20: add phy refclk in support")
> > Suggested-by: Jakub Kicinski <kuba@kernel.org>
> > Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>  
> 
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>

Applied, thanks!

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

end of thread, other threads:[~2021-01-13  2:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-11  8:59 [PATCH] net: phy: smsc: fix clk error handling Marco Felsch
2021-01-11 14:17 ` Andrew Lunn
2021-01-13  2:40   ` Jakub Kicinski

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