diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-10 16:04:53 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-10 16:04:53 -0800 |
commit | 949f6711b83d2809d1ccb9d830155a65fdacdff9 (patch) | |
tree | 4b8bdb0e98489bc8ad77fa144926931c37e2e4f2 /drivers/staging/speakup | |
parent | 443e6221e465efa8efb752a8405a759ef1161af9 (diff) | |
parent | 7959d55679e4360205c9ebc89d40a5503c53bae2 (diff) | |
download | blackbird-obmc-linux-949f6711b83d2809d1ccb9d830155a65fdacdff9.tar.gz blackbird-obmc-linux-949f6711b83d2809d1ccb9d830155a65fdacdff9.zip |
Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (510 commits)
staging: speakup: fix failure handling
staging: usbip: remove double giveback of URB
Staging: batman-adv: Remove batman-adv from staging
Staging: hv: Use only one txf buffer per channel and kmalloc/GFP_KERNEL on initialize
staging: hv: remove unneeded osd_schedule_callback
staging: hv: convert channel_mgmt.c to not call osd_schedule_callback
staging: hv: convert vmbus_on_msg_dpc to not call osd_schedule_callback
staging: brcm80211: Fix WL_<type> logging macros
Staging: IIO: DDS: AD9833 / AD9834 driver
Staging: IIO: dds.h convenience macros
Staging: IIO: Direct digital synthesis abi documentation
staging: brcm80211: Convert ETHER_TYPE_802_1X to ETH_P_PAE
staging: brcm80211: Remove unused ETHER_TYPE_<foo> #defines
staging: brcm80211: Remove ETHER_HDR_LEN, use ETH_HLEN
staging: brcm80211: Convert ETHER_ADDR_LEN to ETH_ALEN
staging: brcm80211: Convert ETHER_IS<FOO> to is_<foo>_ether_addr
staging: brcm80211: Remove unused ether_<foo> #defines and struct
staging: brcm80211: Convert ETHER_IS_MULTI to is_multicast_ether_addr
staging: brcm80211: Remove unused #defines ETHER_<foo>_LOCALADDR
Staging: comedi: Fix checkpatch.pl issues in file s526.c
...
Fix up trivial conflict in drivers/video/udlfb.c
Diffstat (limited to 'drivers/staging/speakup')
-rw-r--r-- | drivers/staging/speakup/kobjects.c | 9 | ||||
-rw-r--r-- | drivers/staging/speakup/main.c | 33 | ||||
-rw-r--r-- | drivers/staging/speakup/spk_types.h | 2 |
3 files changed, 28 insertions, 16 deletions
diff --git a/drivers/staging/speakup/kobjects.c b/drivers/staging/speakup/kobjects.c index cc79f9edfe9e..408bb9b3303e 100644 --- a/drivers/staging/speakup/kobjects.c +++ b/drivers/staging/speakup/kobjects.c @@ -984,8 +984,10 @@ int speakup_kobj_init(void) * not known ahead of time. */ accessibility_kobj = kobject_create_and_add("accessibility", NULL); - if (!accessibility_kobj) - return -ENOMEM; + if (!accessibility_kobj) { + retval = -ENOMEM; + goto out; + } speakup_kobj = kobject_create_and_add("speakup", accessibility_kobj); if (!speakup_kobj) { @@ -1002,7 +1004,7 @@ int speakup_kobj_init(void) if (retval) goto err_group; - return 0; + goto out; err_group: sysfs_remove_group(speakup_kobj, &main_attr_group); @@ -1010,6 +1012,7 @@ err_speakup: kobject_put(speakup_kobj); err_acc: kobject_put(accessibility_kobj); +out: return retval; } diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c index 4b7a9c2b965f..3cd00396a462 100644 --- a/drivers/staging/speakup/main.c +++ b/drivers/staging/speakup/main.c @@ -2253,17 +2253,17 @@ static int __init speakup_init(void) err = speakup_add_virtual_keyboard(); if (err) - return err; + goto out; initialize_msgs(); /* Initialize arrays for i18n. */ first_console = kzalloc(sizeof(*first_console), GFP_KERNEL); - if (!first_console) - return -ENOMEM; - err = speakup_kobj_init(); - if (err) { - kfree(first_console); - return err; + if (!first_console) { + err = -ENOMEM; + goto err_cons; } + err = speakup_kobj_init(); + if (err) + goto err_kobject; reset_default_chars(); reset_default_chartab(); @@ -2299,11 +2299,20 @@ static int __init speakup_init(void) speakup_task = kthread_create(speakup_thread, NULL, "speakup"); set_user_nice(speakup_task, 10); - if (!IS_ERR(speakup_task)) - wake_up_process(speakup_task); - else - return -ENOMEM; - return 0; + if (IS_ERR(speakup_task)) { + err = -ENOMEM; + goto err_kobject; + } + wake_up_process(speakup_task); + goto out; + +err_kobject: +speakup_kobj_exit(); + kfree(first_console); +err_cons: + speakup_remove_virtual_keyboard(); +out: + return err; } module_init(speakup_init); diff --git a/drivers/staging/speakup/spk_types.h b/drivers/staging/speakup/spk_types.h index 840bddb64101..d36c90e30d54 100644 --- a/drivers/staging/speakup/spk_types.h +++ b/drivers/staging/speakup/spk_types.h @@ -52,7 +52,7 @@ typedef int (*special_func)(struct vc_data *vc, u_char type, u_char ch, #define COLOR_BUFFER_SIZE 160 -struct spk_highlight_color_track{ +struct spk_highlight_color_track { /* Count of each background color */ unsigned int bgcount[8]; /* Buffer for characters drawn with each background color */ |