From da074d0ac8ccae1068dc227ef9893c2510d23bd8 Mon Sep 17 00:00:00 2001 From: Peter Oberparleiter Date: Mon, 10 Apr 2006 22:53:44 -0700 Subject: [PATCH] [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 --- drivers/s390/char/keyboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/char/keyboard.c b/drivers/s390/char/keyboard.c index 6badd840340..d4d2ff0a9da 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]) { -- 2.20.1