summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKulikov Vasiliy <segooon@gmail.com>2010-07-31 18:33:59 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-08-04 21:27:38 +0200
commitbb1236115eb6fd9ab7563b6a8cfbcc6980eb3ff1 (patch)
tree3ce264c3ec056c4432ef304625e0f05542670bd6 /drivers
parentiwlagn: fix typo in ucode_bt_stats_read debugfs (diff)
downloadlinux-bb1236115eb6fd9ab7563b6a8cfbcc6980eb3ff1.tar.xz
linux-bb1236115eb6fd9ab7563b6a8cfbcc6980eb3ff1.zip
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 <segooon@gmail.com> Acked-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_spi.c3
1 files changed, 1 insertions, 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