Skip to content

Commit

Permalink
wl1271: Fix memory leaks in SPI initialization
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Juuso Oikarinen authored and John W. Linville committed Mar 31, 2010
1 parent 31627dc commit f83cce3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/wireless/wl12xx/wl1271_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit f83cce3

Please sign in to comment.