Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb123611 authored by Kulikov Vasiliy's avatar Kulikov Vasiliy Committed by John W. Linville
Browse files

net: wl12xx: do not use kfree'd memory



wl1271_dump() uses cmd after kfree(cmd). Move kfree() just after
wl1271_dump().

Signed-off-by: default avatarKulikov Vasiliy <segooon@gmail.com>
Acked-by: default avatarJuuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 74dee2c3
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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