WSL2-Linux-Kernel/drivers/net/ethernet/natsemi
Christophe JAILLET 0f7ba7bc46 net/sonic: Fix some resource leaks in error handling paths
A call to dma_alloc_coherent() is wrapped by sonic_alloc_descriptors().

This is correctly freed in the remove function, but not in the error
handling path of the probe function. Fix this by adding the missing
dma_free_coherent() call.

While at it, rename a label in order to be slightly more informative.

Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Chris Zankel <chris@zankel.net>
References: commit 10e3cc180e ("net/sonic: Fix a resource leak in an error handling path in 'jazz_sonic_probe()'")
Fixes: 74f2a5f0ef ("xtensa: Add support for the Sonic Ethernet device for the XT2000 board.")
Fixes: efcce83936 ("[PATCH] macsonic/jazzsonic network drivers update")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-01-05 15:59:20 -08:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile ethernet: natsemi: correct spelling 2018-03-06 11:14:08 -05:00
jazzsonic.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
macsonic.c net/sonic: Fix some resource leaks in error handling paths 2021-01-05 15:59:20 -08:00
natsemi.c natsemi: switch from 'pci_' to 'dma_' API 2020-09-13 14:15:15 -07:00
ns83820.c drivers/net/ethernet: clean up mis-targeted comments 2020-09-25 16:29:00 -07:00
sonic.c net: natsemi: Replace in_interrupt() usage. 2020-09-29 14:02:54 -07:00
sonic.h net: natsemi: Replace in_interrupt() usage. 2020-09-29 14:02:54 -07:00
xtsonic.c net/sonic: Fix some resource leaks in error handling paths 2021-01-05 15:59:20 -08:00