From: Peter Oberparleiter Date: Tue, 11 Apr 2006 05:53:44 +0000 (-0700) Subject: [PATCH] s390: invalid check after kzalloc() X-Git-Tag: v2.6.17-rc2~223 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da074d0ac8ccae1068dc227ef9893c2510d23bd8;p=linux-2.6 [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: Peter Oberparleiter Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/s390/char/keyboard.c b/drivers/s390/char/keyboard.c index 6badd84034..d4d2ff0a9d 100644 --- a/drivers/s390/char/keyboard.c +++ b/drivers/s390/char/keyboard.c @@ -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]) {