Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb45f588 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Greg Kroah-Hartman
Browse files

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



commit 31457db3750c0b0ed229d836f2609fdb8a5b790e upstream.

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

This patch is a follow-up to commit ac88c531a5b3
("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>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fadd3c4a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1482,8 +1482,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);