提交 da074d0a 编写于 作者: P Peter Oberparleiter 提交者: Linus Torvalds

[PATCH] s390: invalid check after kzalloc()

Typo.  After the call to kzalloc() for kdb->key_maps the test for NULL checks
the wrong variable.
Signed-off-by: NPeter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 06642997
...@@ -54,7 +54,7 @@ kbd_alloc(void) { ...@@ -54,7 +54,7 @@ kbd_alloc(void) {
if (!kbd) if (!kbd)
goto out; goto out;
kbd->key_maps = kzalloc(sizeof(key_maps), GFP_KERNEL); kbd->key_maps = kzalloc(sizeof(key_maps), GFP_KERNEL);
if (!key_maps) if (!kbd->key_maps)
goto out_kbd; goto out_kbd;
for (i = 0; i < ARRAY_SIZE(key_maps); i++) { for (i = 0; i < ARRAY_SIZE(key_maps); i++) {
if (key_maps[i]) { if (key_maps[i]) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册