From bb1236115eb6fd9ab7563b6a8cfbcc6980eb3ff1 Mon Sep 17 00:00:00 2001 From: Kulikov Vasiliy Date: Sat, 31 Jul 2010 20:33:59 +0400 Subject: [PATCH] net: wl12xx: do not use kfree'd memory wl1271_dump() uses cmd after kfree(cmd). Move kfree() just after wl1271_dump(). Signed-off-by: Kulikov Vasiliy Acked-by: Juuso Oikarinen Signed-off-by: John W. Linville --- drivers/net/wireless/wl12xx/wl1271_spi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/wl12xx/wl1271_spi.c b/drivers/net/wireless/wl12xx/wl1271_spi.c index 96d25fb50495..4cb99c541e2a 100644 --- a/drivers/net/wireless/wl12xx/wl1271_spi.c +++ b/drivers/net/wireless/wl12xx/wl1271_spi.c @@ -160,9 +160,8 @@ 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); + kfree(cmd); } #define WL1271_BUSY_WORD_TIMEOUT 1000 -- 2.20.1