Skip to content

Commit

Permalink
tty: vt: Remove redundant null check before kfree.
Browse files Browse the repository at this point in the history
kfree on a NULL pointer is a no-op.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Sachin Kamat authored and Greg Kroah-Hartman committed Nov 26, 2012
1 parent 13c3237 commit daa74a2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/tty/vt/consolemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,8 @@ static void con_release_unimap(struct uni_pagedir *p)
kfree(p->inverse_translations[i]);
p->inverse_translations[i] = NULL;
}
if (p->inverse_trans_unicode) {
kfree(p->inverse_trans_unicode);
p->inverse_trans_unicode = NULL;
}
kfree(p->inverse_trans_unicode);
p->inverse_trans_unicode = NULL;
}

/* Caller must hold the console lock */
Expand Down

0 comments on commit daa74a2

Please sign in to comment.