diff options
author | Jesper Juhl <jesper.juhl@gmail.com> | 2005-11-07 04:01:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:54:02 -0500 |
commit | 735d5661d5c5f023a78fbe68e771e261040ff1b7 (patch) | |
tree | b9865f0322d8e74661639f5f33b1897b23004659 /drivers/char/consolemap.c | |
parent | fa671646f61182cd18234461a6e65f50c6558695 (diff) |
[PATCH] kfree cleanup: drivers/char
This is the drivers/char/ part of the big kfree cleanup patch.
Remove pointless checks for NULL prior to calling kfree() in drivers/char/.
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/consolemap.c')
-rw-r--r-- | drivers/char/consolemap.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/char/consolemap.c b/drivers/char/consolemap.c index 406dea914635..c85a4fa60da7 100644 --- a/drivers/char/consolemap.c +++ b/drivers/char/consolemap.c | |||
@@ -345,17 +345,15 @@ static void con_release_unimap(struct uni_pagedir *p) | |||
345 | for (i = 0; i < 32; i++) { | 345 | for (i = 0; i < 32; i++) { |
346 | if ((p1 = p->uni_pgdir[i]) != NULL) { | 346 | if ((p1 = p->uni_pgdir[i]) != NULL) { |
347 | for (j = 0; j < 32; j++) | 347 | for (j = 0; j < 32; j++) |
348 | if (p1[j]) | 348 | kfree(p1[j]); |
349 | kfree(p1[j]); | ||
350 | kfree(p1); | 349 | kfree(p1); |
351 | } | 350 | } |
352 | p->uni_pgdir[i] = NULL; | 351 | p->uni_pgdir[i] = NULL; |
353 | } | 352 | } |
354 | for (i = 0; i < 4; i++) | 353 | for (i = 0; i < 4; i++) { |
355 | if (p->inverse_translations[i]) { | 354 | kfree(p->inverse_translations[i]); |
356 | kfree(p->inverse_translations[i]); | 355 | p->inverse_translations[i] = NULL; |
357 | p->inverse_translations[i] = NULL; | 356 | } |
358 | } | ||
359 | } | 357 | } |
360 | 358 | ||
361 | void con_free_unimap(struct vc_data *vc) | 359 | void con_free_unimap(struct vc_data *vc) |