From: Peter Oberparleiter Date: Tue, 11 Apr 2006 05:53:44 +0000 (-0700) Subject: [PATCH] s390: invalid check after kzalloc() X-Git-Tag: v3.12-rc1~36715 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=da074d0ac8ccae1068dc227ef9893c2510d23bd8;p=kernel%2Fkernel-generic.git [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 6badd84..d4d2ff0 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]) {