Skip to content

Commit

Permalink
net: davicom: Fix regulator not turned off on failed probe
Browse files Browse the repository at this point in the history
When the probe fails, we must disable the regulator that was previously
enabled.

This patch is a follow-up to commit ac88c53
("net: davicom: Fix regulator not turned off on failed probe") which missed
one case.

Fixes: 7994fe5 ("dm9000: Add regulator and reset support to dm9000")
Signed-off-by: Christophe JAILLET <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
tititiou36 authored and davem330 committed Apr 11, 2021
1 parent 4af2178 commit 31457db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/ethernet/davicom/dm9000.c
Original file line number Diff line number Diff line change
Expand Up @@ -1471,8 +1471,10 @@ dm9000_probe(struct platform_device *pdev)

/* Init network device */
ndev = alloc_etherdev(sizeof(struct board_info));
if (!ndev)
return -ENOMEM;
if (!ndev) {
ret = -ENOMEM;
goto out_regulator_disable;
}

SET_NETDEV_DEV(ndev, &pdev->dev);

Expand Down

0 comments on commit 31457db

Please sign in to comment.