aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/keyboard.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/char/keyboard.c')
-rw-r--r--drivers/s390/char/keyboard.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/s390/char/keyboard.c b/drivers/s390/char/keyboard.c
index 24021fd7de25..18d9a497863b 100644
--- a/drivers/s390/char/keyboard.c
+++ b/drivers/s390/char/keyboard.c
@@ -59,12 +59,11 @@ kbd_alloc(void) {
59 goto out_kbd; 59 goto out_kbd;
60 for (i = 0; i < ARRAY_SIZE(key_maps); i++) { 60 for (i = 0; i < ARRAY_SIZE(key_maps); i++) {
61 if (key_maps[i]) { 61 if (key_maps[i]) {
62 kbd->key_maps[i] = 62 kbd->key_maps[i] = kmemdup(key_maps[i],
63 kmalloc(sizeof(u_short)*NR_KEYS, GFP_KERNEL); 63 sizeof(u_short) * NR_KEYS,
64 GFP_KERNEL);
64 if (!kbd->key_maps[i]) 65 if (!kbd->key_maps[i])
65 goto out_maps; 66 goto out_maps;
66 memcpy(kbd->key_maps[i], key_maps[i],
67 sizeof(u_short)*NR_KEYS);
68 } 67 }
69 } 68 }
70 kbd->func_table = kzalloc(sizeof(func_table), GFP_KERNEL); 69 kbd->func_table = kzalloc(sizeof(func_table), GFP_KERNEL);
@@ -82,12 +81,11 @@ kbd_alloc(void) {
82 kzalloc(sizeof(fn_handler_fn *) * NR_FN_HANDLER, GFP_KERNEL); 81 kzalloc(sizeof(fn_handler_fn *) * NR_FN_HANDLER, GFP_KERNEL);
83 if (!kbd->fn_handler) 82 if (!kbd->fn_handler)
84 goto out_func; 83 goto out_func;
85 kbd->accent_table = 84 kbd->accent_table = kmemdup(accent_table,
86 kmalloc(sizeof(struct kbdiacruc)*MAX_DIACR, GFP_KERNEL); 85 sizeof(struct kbdiacruc) * MAX_DIACR,
86 GFP_KERNEL);
87 if (!kbd->accent_table) 87 if (!kbd->accent_table)
88 goto out_fn_handler; 88 goto out_fn_handler;
89 memcpy(kbd->accent_table, accent_table,
90 sizeof(struct kbdiacruc)*MAX_DIACR);
91 kbd->accent_table_size = accent_table_size; 89 kbd->accent_table_size = accent_table_size;
92 return kbd; 90 return kbd;
93 91