1
0
Fork 0
alistair23-linux/drivers/net/ethernet/natsemi
Christophe JAILLET 2bcd4df42d net/sonic: Fix a resource leak in an error handling path in 'jazz_sonic_probe()'
[ Upstream commit 10e3cc180e ]

A call to 'dma_alloc_coherent()' is hidden in 'sonic_alloc_descriptors()',
called from 'sonic_probe1()'.

This is correctly freed in the remove function, but not in the error
handling path of the probe function.
Fix it and add the missing 'dma_free_coherent()' call.

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

Fixes: efcce83936 ("[PATCH] macsonic/jazzsonic network drivers update")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-05-20 08:20:05 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile ethernet: natsemi: correct spelling 2018-03-06 11:14:08 -05:00
jazzsonic.c net/sonic: Fix a resource leak in an error handling path in 'jazz_sonic_probe()' 2020-05-20 08:20:05 +02:00
macsonic.c net/sonic: Replace custom debug logging with netif_* calls 2018-02-26 14:40:02 -05:00
natsemi.c net: natsemi: replace dev_kfree_skb_irq by dev_consume_skb_irq for drop profiles 2019-02-14 11:56:36 -05:00
ns83820.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
sonic.c net/sonic: Prevent tx watchdog timeout 2020-01-29 16:45:33 +01:00
sonic.h net/sonic: Quiesce SONIC before re-initializing descriptor memory 2020-01-29 16:45:32 +01:00
xtsonic.c net/sonic: Replace custom debug logging with netif_* calls 2018-02-26 14:40:02 -05:00