diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-21 22:42:25 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-21 22:42:25 -0500 |
commit | f290fc3669d659a915e29b6bdb82d454b437cf93 (patch) | |
tree | 1c6d7122e4462f15f6db05255c7cd89badcb576f /net/rfkill/rfkill.c | |
parent | 240d3b54e3a8a8d469f0ff6deacf52f4b751f55a (diff) | |
parent | 5b4d383a1a562de6955cacd72e20809064ee137f (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
[ICMP]: ICMP_MIB_OUTMSGS increment duplicated
[IPV6]: RFC 2011 compatibility broken
[IPV6]: ICMP6_MIB_OUTMSGS increment duplicated
[NET]: rtnl_link: fix use-after-free
[AF_KEY]: Fix skb leak on pfkey_send_migrate() error
[ATM] atm/suni.c: Fix section mismatch.
[ATM] atm/idt77105.c: Fix section mismatch.
[IrDA]: af_irda memory leak fixes
[NEIGH]: Revert 'Fix race between neigh_parms_release and neightbl_fill_parms'
[NETFILTER]: bridge-netfilter: fix net_device refcnt leaks
[IPV6] ROUTE: Make sending algorithm more friendly with RFC 4861.
[IPV4] FIB_HASH : Avoid unecessary loop in fn_hash_dump_zone()
[NET]: Fix interrupt semaphore corruption in Intel drivers.
[IPV4] fib_trie: fix duplicated route issue
[IPV4] fib_hash: fix duplicated route issue
[IPV6]: Mischecked tw match in __inet6_check_established.
rfkill: call rfkill_led_trigger_unregister() on error
Diffstat (limited to 'net/rfkill/rfkill.c')
-rw-r--r-- | 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 4469a7be006c..d06d338812e9 100644 --- a/net/rfkill/rfkill.c +++ b/net/rfkill/rfkill.c | |||
@@ -392,11 +392,14 @@ int rfkill_register(struct rfkill *rfkill) | |||
392 | rfkill_led_trigger_register(rfkill); | 392 | rfkill_led_trigger_register(rfkill); |
393 | 393 | ||
394 | error = rfkill_add_switch(rfkill); | 394 | error = rfkill_add_switch(rfkill); |
395 | if (error) | 395 | if (error) { |
396 | rfkill_led_trigger_unregister(rfkill); | ||
396 | return error; | 397 | return error; |
398 | } | ||
397 | 399 | ||
398 | error = device_add(dev); | 400 | error = device_add(dev); |
399 | if (error) { | 401 | if (error) { |
402 | rfkill_led_trigger_unregister(rfkill); | ||
400 | rfkill_remove_switch(rfkill); | 403 | rfkill_remove_switch(rfkill); |
401 | return error; | 404 | return error; |
402 | } | 405 | } |