[PATCH] s390: invalid check after kzalloc()
authorPeter Oberparleiter <peter.oberparleiter@de.ibm.com>
Tue, 11 Apr 2006 05:53:44 +0000 (22:53 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 11 Apr 2006 13:18:37 +0000 (06:18 -0700)
Typo.  After the call to kzalloc() for kdb->key_maps the test for NULL checks
the wrong variable.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/s390/char/keyboard.c

index 6badd84034094f7db6b6fdaf450c11799d60265f..d4d2ff0a9da2003eb7ed8cd0d2b70dc0ae827c3b 100644 (file)
@@ -54,7 +54,7 @@ kbd_alloc(void) {
        if (!kbd)
                goto out;
        kbd->key_maps = kzalloc(sizeof(key_maps), GFP_KERNEL);
-       if (!key_maps)
+       if (!kbd->key_maps)
                goto out_kbd;
        for (i = 0; i < ARRAY_SIZE(key_maps); i++) {
                if (key_maps[i]) {