[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>
This commit is contained in:

committed by
Linus Torvalds

parent
fa671646f6
commit
735d5661d5
@@ -345,17 +345,15 @@ static void con_release_unimap(struct uni_pagedir *p)
|
||||
for (i = 0; i < 32; i++) {
|
||||
if ((p1 = p->uni_pgdir[i]) != NULL) {
|
||||
for (j = 0; j < 32; j++)
|
||||
if (p1[j])
|
||||
kfree(p1[j]);
|
||||
kfree(p1[j]);
|
||||
kfree(p1);
|
||||
}
|
||||
p->uni_pgdir[i] = NULL;
|
||||
}
|
||||
for (i = 0; i < 4; i++)
|
||||
if (p->inverse_translations[i]) {
|
||||
kfree(p->inverse_translations[i]);
|
||||
p->inverse_translations[i] = NULL;
|
||||
}
|
||||
for (i = 0; i < 4; i++) {
|
||||
kfree(p->inverse_translations[i]);
|
||||
p->inverse_translations[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void con_free_unimap(struct vc_data *vc)
|
||||
|
Reference in New Issue
Block a user