[patch 3/9] s390: invalid check after kzalloc()

From: Martin Schwidefsky
Date: Mon Apr 03 2006 - 13:22:24 EST


From: Peter Oberparleiter <peter.oberparleiter@xxxxxxxxxx>

[patch 3/9] 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 <peter.oberparleiter@xxxxxxxxxx>
Signed-off-by: Martin Schwidefsky <schwidefsky@xxxxxxxxxx>
---

drivers/s390/char/keyboard.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

diff -urpN linux-2.6/drivers/s390/char/keyboard.c linux-2.6-patched/drivers/s390/char/keyboard.c
--- linux-2.6/drivers/s390/char/keyboard.c 2006-04-03 18:46:20.000000000 +0200
+++ linux-2.6-patched/drivers/s390/char/keyboard.c 2006-04-03 18:46:36.000000000 +0200
@@ -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]) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/