Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=632041f306707df94110441f55b1458ebeb096db
Commit:     632041f306707df94110441f55b1458ebeb096db
Parent:     a7da60f41551abb3c520b03d42ec05dd7decfc7f
Author:     Eric Paris <[EMAIL PROTECTED]>
AuthorDate: Sun Jan 13 16:20:56 2008 -0500
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Sun Jan 20 20:31:36 2008 -0800

    rfkill: call rfkill_led_trigger_unregister() on error
    
    Code inspection turned up that error cases in rfkill_register() do not
    call rfkill_led_trigger_unregister() even though we have already
    registered.
    
    Signed-off-by: Eric Paris <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---
 net/rfkill/rfkill.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c
index 4469a7b..d06d338 100644
--- a/net/rfkill/rfkill.c
+++ b/net/rfkill/rfkill.c
@@ -392,11 +392,14 @@ int rfkill_register(struct rfkill *rfkill)
        rfkill_led_trigger_register(rfkill);
 
        error = rfkill_add_switch(rfkill);
-       if (error)
+       if (error) {
+               rfkill_led_trigger_unregister(rfkill);
                return error;
+       }
 
        error = device_add(dev);
        if (error) {
+               rfkill_led_trigger_unregister(rfkill);
                rfkill_remove_switch(rfkill);
                return error;
        }
-
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