diff options
author | Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com> | 2020-03-17 10:24:35 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-03-17 21:20:38 -0700 |
commit | 872307abbd0d9afd72171929806c2fa33dc34179 (patch) | |
tree | 15e79c52c6c397e3f81f233baef1975799c033fc /drivers/net | |
parent | af4e6671b21ff20ad189360d3a5a1d584c183091 (diff) |
net: phy: mdio-mux-bcm-iproc: check clk_prepare_enable() return value
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/phy/mdio-mux-bcm-iproc.c | 7 |
1 files changed, 6 insertions, 1 deletions
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; |