Skip to content

Commit e1e54ec

Browse files
tititiou36davem330
authored andcommitted
net: seeq: Fix the function used to release some memory in an error handling path
In commit 99cd149 ("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: 99cd149 ("sgiseeq: replace use of dma_cache_wback_inv") Signed-off-by: Christophe JAILLET <[email protected]> Reviewed-by: Thomas Bogendoerfer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent dd7078f commit e1e54ec

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/net/ethernet/seeq/sgiseeq.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -794,15 +794,16 @@ static int sgiseeq_probe(struct platform_device *pdev)
794794
printk(KERN_ERR "Sgiseeq: Cannot register net device, "
795795
"aborting.\n");
796796
err = -ENODEV;
797-
goto err_out_free_page;
797+
goto err_out_free_attrs;
798798
}
799799

800800
printk(KERN_INFO "%s: %s %pM\n", dev->name, sgiseeqstr, dev->dev_addr);
801801

802802
return 0;
803803

804-
err_out_free_page:
805-
free_page((unsigned long) sp->srings);
804+
err_out_free_attrs:
805+
dma_free_attrs(&pdev->dev, sizeof(*sp->srings), sp->srings,
806+
sp->srings_dma, DMA_ATTR_NON_CONSISTENT);
806807
err_out_free_dev:
807808
free_netdev(dev);
808809

0 commit comments

Comments
 (0)