Skip to content

Commit 872307a

Browse files
rayagondadavem330
authored andcommitted
net: phy: mdio-mux-bcm-iproc: check clk_prepare_enable() return value
Check clk_prepare_enable() return value. Fixes: 2c72304 ("net: phy: Add pm support to Broadcom iProc mdio mux driver") Signed-off-by: Rayagonda Kokatanur <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent af4e667 commit 872307a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/net/phy/mdio-mux-bcm-iproc.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,13 @@ static int mdio_mux_iproc_suspend(struct device *dev)
288288
static int mdio_mux_iproc_resume(struct device *dev)
289289
{
290290
struct iproc_mdiomux_desc *md = dev_get_drvdata(dev);
291+
int rc;
291292

292-
clk_prepare_enable(md->core_clk);
293+
rc = clk_prepare_enable(md->core_clk);
294+
if (rc) {
295+
dev_err(md->dev, "failed to enable core clk\n");
296+
return rc;
297+
}
293298
mdio_mux_iproc_config(md);
294299

295300
return 0;

0 commit comments

Comments
 (0)