diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-08-03 09:39:11 +0300 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2018-10-30 00:23:12 +0300 |
commit | d312a25d477519d5d47f8ce850e80b52cf4113b0 (patch) | |
tree | 8810685daaa5632f4c8262656e6a06e8f520d08c /arch/um/kernel/irq.c | |
parent | 369cca266860db8222c991fced8caa42c3e5b05f (diff) | |
download | linux-d312a25d477519d5d47f8ce850e80b52cf4113b0.tar.xz |
um: NULL check before kfree is not needed
kfree(NULL) is safe,so this removes NULL check before freeing the mem
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/kernel/irq.c')
-rw-r--r-- | arch/um/kernel/irq.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index 6b7f3827d6e4..8360fa3f676d 100644 --- a/arch/um/kernel/irq.c +++ b/arch/um/kernel/irq.c @@ -244,8 +244,7 @@ static void garbage_collect_irq_entries(void) to_free = NULL; } walk = walk->next; - if (to_free != NULL) - kfree(to_free); + kfree(to_free); } } |