summaryrefslogtreecommitdiff
path: root/arch/um/kernel/irq.c
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-08-03 09:39:11 +0300
committerRichard Weinberger <richard@nod.at>2018-10-30 00:23:12 +0300
commitd312a25d477519d5d47f8ce850e80b52cf4113b0 (patch)
tree8810685daaa5632f4c8262656e6a06e8f520d08c /arch/um/kernel/irq.c
parent369cca266860db8222c991fced8caa42c3e5b05f (diff)
downloadlinux-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.c3
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);
}
}