From 978e7c3e077bd8e11d3b96afcbe89ad461b56ce7 Mon Sep 17 00:00:00 2001 From: Luciano Coelho Date: Wed, 22 Feb 2012 18:24:28 +0200 Subject: [PATCH] wlcore: fix "wlcore: update beacon and probe_resp..." (SQUASH) This makes the code a bit cleaner. Thanks Eliad for the comment. Needs to be squashed with: fbf05e7f (wlcore: update beacon and probe_resp templates when rates change) Signed-off-by: Luciano Coelho --- drivers/net/wireless/ti/wlcore/main.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index e01bcd27b3f3..86281f4a597a 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -3241,14 +3241,15 @@ static int wl1271_ap_set_probe_resp_tmpl(struct wl1271 *wl, u32 rates, skb->data, skb->len, 0, rates); - dev_kfree_skb(skb); - if (ret == 0) { - wl1271_debug(DEBUG_AP, "probe response updated"); - set_bit(WLVIF_FLAG_AP_PROBE_RESP_SET, &wlvif->flags); - } + if (ret < 0) + goto out; + + wl1271_debug(DEBUG_AP, "probe response updated"); + set_bit(WLVIF_FLAG_AP_PROBE_RESP_SET, &wlvif->flags); +out: return ret; }