Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8712f2769dd66d8e7ff179d525b93e0a15a5b963
Commit:     8712f2769dd66d8e7ff179d525b93e0a15a5b963
Parent:     1946a2c3c6d138f0e1face8734226d9ba090e831
Author:     Michael Buesch <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 23 12:15:38 2008 +0100
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Jan 31 19:26:36 2008 -0800

    b43legacy: Fix rfkill allocation leakage in error paths
    
    We must kill rfkill in any error paths that trigger after rfkill init.
    
    Signed-off-by: Michael Buesch <[EMAIL PROTECTED]>
    Acked-by: Stefano Brivio <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/net/wireless/b43legacy/main.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/b43legacy/main.c 
b/drivers/net/wireless/b43legacy/main.c
index 4ed4243..b9a046f 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -3221,6 +3221,7 @@ static int b43legacy_op_start(struct ieee80211_hw *hw)
        struct b43legacy_wldev *dev = wl->current_dev;
        int did_init = 0;
        int err = 0;
+       bool do_rfkill_exit = 0;
 
        /* First register RFkill.
         * LEDs that are registered later depend on it. */
@@ -3230,8 +3231,10 @@ static int b43legacy_op_start(struct ieee80211_hw *hw)
 
        if (b43legacy_status(dev) < B43legacy_STAT_INITIALIZED) {
                err = b43legacy_wireless_core_init(dev);
-               if (err)
+               if (err) {
+                       do_rfkill_exit = 1;
                        goto out_mutex_unlock;
+               }
                did_init = 1;
        }
 
@@ -3240,6 +3243,7 @@ static int b43legacy_op_start(struct ieee80211_hw *hw)
                if (err) {
                        if (did_init)
                                b43legacy_wireless_core_exit(dev);
+                       do_rfkill_exit = 1;
                        goto out_mutex_unlock;
                }
        }
@@ -3247,6 +3251,9 @@ static int b43legacy_op_start(struct ieee80211_hw *hw)
 out_mutex_unlock:
        mutex_unlock(&wl->mutex);
 
+       if (do_rfkill_exit)
+               b43legacy_rfkill_exit(dev);
+
        return err;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to