aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorGrazvydas Ignotas <notasas@gmail.com>2012-06-16 15:26:48 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-06-20 14:10:25 -0400
commita859e4d6590b2429f518aa712b9e3edd367398d7 (patch)
tree41d9f7b2dd3abc846f54d52d9d760df3627fcda9 /drivers/net
parent0d776fcdafed91403b1f453473771664ef7a66bd (diff)
wl1251: Fix memory leaks in SPI initialization
This patch fixes two memory leaks in the SPI initialization code. Patch based on old maemo patch by: Yuri Ershov <ext-yuri.ershov@nokia.com> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ti/wl1251/spi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c
index 87f6305bda2c..567660cd2fcd 100644
--- a/drivers/net/wireless/ti/wl1251/spi.c
+++ b/drivers/net/wireless/ti/wl1251/spi.c
@@ -73,6 +73,8 @@ static void wl1251_spi_reset(struct wl1251 *wl)
73 spi_sync(wl_to_spi(wl), &m); 73 spi_sync(wl_to_spi(wl), &m);
74 74
75 wl1251_dump(DEBUG_SPI, "spi reset -> ", cmd, WSPI_INIT_CMD_LEN); 75 wl1251_dump(DEBUG_SPI, "spi reset -> ", cmd, WSPI_INIT_CMD_LEN);
76
77 kfree(cmd);
76} 78}
77 79
78static void wl1251_spi_wake(struct wl1251 *wl) 80static void wl1251_spi_wake(struct wl1251 *wl)
@@ -127,6 +129,8 @@ static void wl1251_spi_wake(struct wl1251 *wl)
127 spi_sync(wl_to_spi(wl), &m); 129 spi_sync(wl_to_spi(wl), &m);
128 130
129 wl1251_dump(DEBUG_SPI, "spi init -> ", cmd, WSPI_INIT_CMD_LEN); 131 wl1251_dump(DEBUG_SPI, "spi init -> ", cmd, WSPI_INIT_CMD_LEN);
132
133 kfree(cmd);
130} 134}
131 135
132static void wl1251_spi_reset_wake(struct wl1251 *wl) 136static void wl1251_spi_reset_wake(struct wl1251 *wl)