net: seeq: Fix the function used to release some memory in an error handling path
authorChristophe JAILLET <>
Sat, 31 Aug 2019 07:17:51 +0000 (09:17 +0200)
committerDavid S. Miller <>
Sun, 1 Sep 2019 19:10:11 +0000 (12:10 -0700)
In commit 99cd149efe82 ("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: 99cd149efe82 ("sgiseeq: replace use of dma_cache_wback_inv")
Signed-off-by: Christophe JAILLET <>
Reviewed-by: Thomas Bogendoerfer <>
Signed-off-by: David S. Miller <>

index 7a5e6c5abb57bd48407fde0438a51a4f2ecb0acd..276c7cae7ceeb02b721a6d0118a5df570fd2704e 100644 (file)
@@ -794,15 +794,16 @@ static int sgiseeq_probe(struct platform_device *pdev)
                printk(KERN_ERR "Sgiseeq: Cannot register net device, "
                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);
        return 0;
-       free_page((unsigned long) sp->srings);
+       dma_free_attrs(&pdev->dev, sizeof(*sp->srings), sp->srings,
+                      sp->srings_dma, DMA_ATTR_NON_CONSISTENT);