mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-24 07:20:23 +07:00
wl1271: Fix memory leaks in SPI initialization
This patch fixes two memory leaks in the SPI initialization code. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Kalle Valo <kalle.valo@iki.fi> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
31627dc59b
commit
f83cce3551
@ -104,6 +104,7 @@ static void wl1271_spi_reset(struct wl1271 *wl)
|
||||
spi_message_add_tail(&t, &m);
|
||||
|
||||
spi_sync(wl_to_spi(wl), &m);
|
||||
kfree(cmd);
|
||||
|
||||
wl1271_dump(DEBUG_SPI, "spi reset -> ", cmd, WSPI_INIT_CMD_LEN);
|
||||
}
|
||||
@ -158,6 +159,7 @@ static void wl1271_spi_init(struct wl1271 *wl)
|
||||
spi_message_add_tail(&t, &m);
|
||||
|
||||
spi_sync(wl_to_spi(wl), &m);
|
||||
kfree(cmd);
|
||||
|
||||
wl1271_dump(DEBUG_SPI, "spi init -> ", cmd, WSPI_INIT_CMD_LEN);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user