Skip to content

Commit

Permalink
net: mvmdio: disable/unprepare clocks in EPROBE_DEFER case
Browse files Browse the repository at this point in the history
add appropriate calls to clk_disable_unprepare() by jumping to out_mdio
in case orion_mdio_probe() returns -EPROBE_DEFER.

Found by Linux Driver Verification project (linuxtesting.org).

Fixes: 3d604da ("net: mvmdio: get and enable optional clock")
Signed-off-by: Tobias Jordan <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Tobias Jordan authored and davem330 committed Dec 7, 2017
1 parent 30f1e59 commit 589bf32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/marvell/mvmdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ static int orion_mdio_probe(struct platform_device *pdev)
dev->regs + MVMDIO_ERR_INT_MASK);

} else if (dev->err_interrupt == -EPROBE_DEFER) {
return -EPROBE_DEFER;
ret = -EPROBE_DEFER;
goto out_mdio;
}

if (pdev->dev.of_node)
Expand Down

0 comments on commit 589bf32

Please sign in to comment.