From: Peter Oberparleiter Date: Tue, 11 Apr 2006 05:53:44 +0000 (-0700) Subject: [PATCH] s390: invalid check after kzalloc() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=da074d0ac8ccae1068dc227ef9893c2510d23bd8;p=openwrt%2Fstaging%2Fblogic.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 6badd8403409..d4d2ff0a9da2 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]) {