Skip to content

Commit

Permalink
[PATCH] s390: invalid check after kzalloc()
Browse files Browse the repository at this point in the history
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@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Peter Oberparleiter authored and Linus Torvalds committed Apr 11, 2006
1 parent 0664299 commit da074d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/s390/char/keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand Down

0 comments on commit da074d0

Please sign in to comment.