[PATCH -next] net: sun4i-emac: fix a typo in emac_probe()

Joe Perches joe at perches.com
Tue Jun 4 02:20:49 EST 2013


On Mon, 2013-06-03 at 21:36 +0800, Wei Yongjun wrote:
> Just fixed a typo in emac_probe().

also fixed a memory leak.

> diff --git a/drivers/net/ethernet/allwinner/sun4i-emac.c b/drivers/net/ethernet/allwinner/sun4i-emac.c
[]
> @@ -821,7 +821,7 @@ static int emac_probe(struct platform_device *pdev)
>  	db->membase = of_iomap(np, 0);
>  	if (!db->membase) {
>  		dev_err(&pdev->dev, "failed to remap registers\n");
> -		return -ENOMEM;
> +		ret = -ENOMEM;
>  		goto out;
>  	}

out:
	dev_err(db->dev, "not found (%d).\n", ret);

	free_netdev(ndev);




More information about the devicetree-discuss mailing list