Commit 31457db3 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by David S. Miller

net: davicom: Fix regulator not turned off on failed probe

When the probe fails, we must disable the regulator that was previously
enabled.

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

Fixes: 7994fe55 ("dm9000: Add regulator and reset support to dm9000")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4af2178a
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment