提交 e1e54ec7 编写于 作者: C Christophe JAILLET 提交者: David S. Miller

net: seeq: Fix the function used to release some memory in an error handling path

In commit 99cd149e ("sgiseeq: replace use of dma_cache_wback_inv"),
a call to 'get_zeroed_page()' has been turned into a call to
'dma_alloc_coherent()'. Only the remove function has been updated to turn
the corresponding 'free_page()' into 'dma_free_attrs()'.
The error hndling path of the probe function has not been updated.

Fix it now.

Rename the corresponding label to something more in line.

Fixes: 99cd149e ("sgiseeq: replace use of dma_cache_wback_inv")
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: NThomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 dd7078f0
...@@ -794,15 +794,16 @@ static int sgiseeq_probe(struct platform_device *pdev) ...@@ -794,15 +794,16 @@ static int sgiseeq_probe(struct platform_device *pdev)
printk(KERN_ERR "Sgiseeq: Cannot register net device, " printk(KERN_ERR "Sgiseeq: Cannot register net device, "
"aborting.\n"); "aborting.\n");
err = -ENODEV; err = -ENODEV;
goto err_out_free_page; goto err_out_free_attrs;
} }
printk(KERN_INFO "%s: %s %pM\n", dev->name, sgiseeqstr, dev->dev_addr); printk(KERN_INFO "%s: %s %pM\n", dev->name, sgiseeqstr, dev->dev_addr);
return 0; return 0;
err_out_free_page: err_out_free_attrs:
free_page((unsigned long) sp->srings); dma_free_attrs(&pdev->dev, sizeof(*sp->srings), sp->srings,
sp->srings_dma, DMA_ATTR_NON_CONSISTENT);
err_out_free_dev: err_out_free_dev:
free_netdev(dev); free_netdev(dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册