Message ID | 20200317045435.29975-1-rayagonda.kokatanur@broadcom.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | 872307abbd0d9afd72171929806c2fa33dc34179 |
Headers | show |
Series | [v1,1/1] net: phy: mdio-mux-bcm-iproc: check clk_prepare_enable() return value | expand |
On Tue, Mar 17, 2020 at 10:24:35AM +0530, Rayagonda Kokatanur wrote: > Check clk_prepare_enable() return value. > > Fixes: 2c7230446bc9 ("net: phy: Add pm support to Broadcom iProc mdio mux driver") > Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
From: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> Date: Tue, 17 Mar 2020 10:24:35 +0530 > Check clk_prepare_enable() return value. > > Fixes: 2c7230446bc9 ("net: phy: Add pm support to Broadcom iProc mdio mux driver") > Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> Applied.
From: David Miller <davem@davemloft.net> Date: Tue, 17 Mar 2020 21:21:27 -0700 (PDT) > From: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> > Date: Tue, 17 Mar 2020 10:24:35 +0530 > >> Check clk_prepare_enable() return value. >> >> Fixes: 2c7230446bc9 ("net: phy: Add pm support to Broadcom iProc mdio mux driver") >> Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> > > Applied. I also queued this up for -stable as well.
diff --git a/drivers/net/phy/mdio-mux-bcm-iproc.c b/drivers/net/phy/mdio-mux-bcm-iproc.c index 88d409e48c1f..aad6809ebe39 100644 --- a/drivers/net/phy/mdio-mux-bcm-iproc.c +++ b/drivers/net/phy/mdio-mux-bcm-iproc.c @@ -288,8 +288,13 @@ static int mdio_mux_iproc_suspend(struct device *dev) static int mdio_mux_iproc_resume(struct device *dev) { struct iproc_mdiomux_desc *md = dev_get_drvdata(dev); + int rc; - clk_prepare_enable(md->core_clk); + rc = clk_prepare_enable(md->core_clk); + if (rc) { + dev_err(md->dev, "failed to enable core clk\n"); + return rc; + } mdio_mux_iproc_config(md); return 0;
Check clk_prepare_enable() return value. Fixes: 2c7230446bc9 ("net: phy: Add pm support to Broadcom iProc mdio mux driver") Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> --- drivers/net/phy/mdio-mux-bcm-iproc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)