summaryrefslogtreecommitdiff
path: root/drivers/staging/speakup
diff options
context:
space:
mode:
authorPranay Kr. Srivastava <pranjas@gmail.com>2017-03-21 12:40:23 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-23 14:16:52 +0100
commitad5a942f6c2055597192b31f9a92c47bf851f90d (patch)
tree86c61409a9ebf04a5be0e12dc64626e1e42648a4 /drivers/staging/speakup
parent4e9cc9a0a5b6c03f3ab652719b3add6562dde25e (diff)
remove unnecessary initial allocation of vc
This patch removes the unnecessary allocation of current foreground vc during initialization. This initialization is already handled in the loop that follows it for all available virtual consoles. Signed-off-by: Pranay Kr. Srivastava <pranjas@gmail.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/speakup')
-rw-r--r--drivers/staging/speakup/main.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
index 9e3d9c52255f..d890b9a864de 100644
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -2329,7 +2329,6 @@ static int __init speakup_init(void)
{
int i;
long err = 0;
- struct st_spk_t *first_console;
struct vc_data *vc = vc_cons[fg_console].d;
struct var_t *var;
@@ -2354,15 +2353,6 @@ static int __init speakup_init(void)
if (err)
goto error_virtkeyboard;
- first_console = kzalloc(sizeof(*first_console), GFP_KERNEL);
- if (!first_console) {
- err = -ENOMEM;
- goto error_alloc;
- }
-
- speakup_console[vc->vc_num] = first_console;
- speakup_date(vc);
-
for (i = 0; i < MAX_NR_CONSOLES; i++)
if (vc_cons[i].d) {
err = speakup_allocate(vc_cons[i].d);
@@ -2424,7 +2414,6 @@ error_kobjects:
for (i = 0; i < MAX_NR_CONSOLES; i++)
kfree(speakup_console[i]);
-error_alloc:
speakup_remove_virtual_keyboard();
error_virtkeyboard: