Skip to content

Commit

Permalink
net: lantiq: fix missing free_netdev() on error in ltq_etop_probe()
Browse files Browse the repository at this point in the history
Add the missing free_netdev() before return from ltq_etop_probe()
in the error handling case.

Fixes: 14d4e30 ("net: lantiq: configure the burst length in ethernet drivers")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Yang Yingliang authored and David S. Miller committed Nov 30, 2021
1 parent 6130805 commit 2680ce7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/lantiq_etop.c
Original file line number Diff line number Diff line change
Expand Up @@ -687,13 +687,13 @@ ltq_etop_probe(struct platform_device *pdev)
err = device_property_read_u32(&pdev->dev, "lantiq,tx-burst-length", &priv->tx_burst_len);
if (err < 0) {
dev_err(&pdev->dev, "unable to read tx-burst-length property\n");
return err;
goto err_free;
}

err = device_property_read_u32(&pdev->dev, "lantiq,rx-burst-length", &priv->rx_burst_len);
if (err < 0) {
dev_err(&pdev->dev, "unable to read rx-burst-length property\n");
return err;
goto err_free;
}

for (i = 0; i < MAX_DMA_CHAN; i++) {
Expand Down

0 comments on commit 2680ce7

Please sign in to comment.