wl1251: Fix memory leak in data path command handling
authorYuri Ershov <ext-yuri.ershov@nokia.com>
Wed, 27 Oct 2010 10:45:18 +0000 (14:45 +0400)
committerGrazvydas Ignotas <notasas@gmail.com>
Sat, 5 Mar 2011 21:18:01 +0000 (23:18 +0200)
This patch fixes a memory leak in the data path command handling code.

Signed-off-by: Yuri Ershov <ext-yuri.ershov@nokia.com>
drivers/net/wireless/wl12xx/wl1251_cmd.c

index c0cdcd0..fcae4bc 100644 (file)
@@ -264,7 +264,7 @@ int wl1251_cmd_data_path_tx(struct wl1251 *wl, u8 channel, bool enable)
        if (ret < 0) {
                wl1251_error("tx %s cmd for channel %d failed",
                             enable ? "start" : "stop", channel);
        if (ret < 0) {
                wl1251_error("tx %s cmd for channel %d failed",
                             enable ? "start" : "stop", channel);
-               return ret;
+               goto out;
        }
 
        wl1251_debug(DEBUG_BOOT, "tx %s cmd channel %d",
        }
 
        wl1251_debug(DEBUG_BOOT, "tx %s cmd channel %d",