linux/drivers/net/wireless/microchip/wilc1000
Dan Carpenter 4894edacfa wilc1000: fix double free error in probe()
Smatch complains that there is a double free in probe:

drivers/net/wireless/microchip/wilc1000/spi.c:186 wilc_bus_probe() error: double free of 'spi_priv'
drivers/net/wireless/microchip/wilc1000/sdio.c:163 wilc_sdio_probe() error: double free of 'sdio_priv'

The problem is that wilc_netdev_cleanup() function frees "wilc->bus_data".
That's confusing and a layering violation.  Leave the frees in probe(),
delete the free in wilc_netdev_cleanup(), and add some new frees to the
remove() functions.

Fixes: dc8b338f3b ("wilc1000: use goto labels on error path")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20211217150311.GC16611@kili
2021-12-20 20:44:03 +02:00
..
cfg80211.c wilc1000: Rename workqueue from "WILC_wq" to "NETDEV-wq" 2021-12-14 20:46:35 +02:00
cfg80211.h
fw.h wilc1000: use flexible-array member instead of zero-length array 2021-01-14 19:33:02 +02:00
hif.c wilc1000: Improve WILC TX performance when power_save is off 2021-12-16 10:30:21 +02:00
hif.h wilc1000: add new WID to pass wake_enable information to firmware 2021-09-21 18:08:15 +03:00
Kconfig wilc1000: Add support for enabling CRC 2021-04-17 20:47:40 +03:00
Makefile wilc1000: use API version number info along with firmware filename 2020-07-14 20:52:27 +03:00
mon.c cfg80211: change netdev registration/unregistration semantics 2021-01-22 16:28:39 +01:00
netdev.c wilc1000: fix double free error in probe() 2021-12-20 20:44:03 +02:00
netdev.h wilc1000: Improve WILC TX performance when power_save is off 2021-12-16 10:30:21 +02:00
sdio.c wilc1000: fix double free error in probe() 2021-12-20 20:44:03 +02:00
spi.c wilc1000: fix double free error in probe() 2021-12-20 20:44:03 +02:00
wlan.c wilc1000: Improve WILC TX performance when power_save is off 2021-12-16 10:30:21 +02:00
wlan.h wilc1000: Rename SPI driver from "WILC_SPI" to "wilc1000_spi" 2021-12-14 20:46:33 +02:00
wlan_cfg.c wilc1000: add new WID to pass wake_enable information to firmware 2021-09-21 18:08:15 +03:00
wlan_cfg.h
wlan_if.h wilc1000: configure registers to handle chip wakeup sequence 2021-09-21 18:08:15 +03:00