Commit 2680ce7f authored by Yang Yingliang's avatar Yang Yingliang Committed by David S. Miller

net: lantiq: fix missing free_netdev() on error in ltq_etop_probe()

Add the missing free_netdev() before return from ltq_etop_probe()
in the error handling case.

Fixes: 14d4e308 ("net: lantiq: configure the burst length in ethernet drivers")
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 61308050
...@@ -687,13 +687,13 @@ ltq_etop_probe(struct platform_device *pdev) ...@@ -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); err = device_property_read_u32(&pdev->dev, "lantiq,tx-burst-length", &priv->tx_burst_len);
if (err < 0) { if (err < 0) {
dev_err(&pdev->dev, "unable to read tx-burst-length property\n"); 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); err = device_property_read_u32(&pdev->dev, "lantiq,rx-burst-length", &priv->rx_burst_len);
if (err < 0) { if (err < 0) {
dev_err(&pdev->dev, "unable to read rx-burst-length property\n"); 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++) { for (i = 0; i < MAX_DMA_CHAN; i++) {
......
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