mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 01:51:34 +00:00
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 commitac88c531a5
("net: davicom: Fix regulator not turned off on failed probe") which missed one case. Fixes:7994fe55a4
("dm9000: Add regulator and reset support to dm9000") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4af2178ac6
commit
31457db375
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user