Skip to content

Commit

Permalink
net: phy: mdio-mux-bcm-iproc: check clk_prepare_enable() return value
Browse files Browse the repository at this point in the history
Check clk_prepare_enable() return value.

Fixes: 2c72304 ("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>
  • Loading branch information
Rayagonda Kokatanur authored and David S. Miller committed Mar 18, 2020
1 parent af4e667 commit 872307a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/net/phy/mdio-mux-bcm-iproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 872307a

Please sign in to comment.