[PATCH 1/1] [IA64] Deletion of unnecessary checks before the function call "unw_remove_unwind_table"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Fenghua Yu <fenghua.yu@xxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx
- Subject: [PATCH 1/1] [IA64] Deletion of unnecessary checks before the function call "unw_remove_unwind_table"
- From: SF Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 22 Nov 2014 00:01:41 +0100
- Cc: LKML <linux-kernel@xxxxxxxxxxxxxxx>, kernel-janitors@xxxxxxxxxxxxxxx, Julia Lawall <julia.lawall@xxxxxxx>
- In-reply-to: <5317A59D.4@users.sourceforge.net>
- List-id: <linux-ia64.vger.kernel.org>
- References: <5307CAA2.8060406@users.sourceforge.net> <alpine.DEB.2.02.1402212321410.2043@localhost6.localdomain6> <530A086E.8010901@users.sourceforge.net> <alpine.DEB.2.02.1402231635510.1985@localhost6.localdomain6> <530A72AA.3000601@users.sourceforge.net> <alpine.DEB.2.02.1402240658210.2090@localhost6.localdomain6> <530B5FB6.6010207@users.sourceforge.net> <alpine.DEB.2.10.1402241710370.2074@hadrien> <530C5E18.1020800@users.sourceforge.net> <alpine.DEB.2.10.1402251014170.2080@hadrien> <530CD2C4.4050903@users.sourceforge.net> <alpine.DEB.2.10.1402251840450.7035@hadrien> <530CF8FF.8080600@users.sourceforge.net> <alpine.DEB.2.02.1402252117150.2047@localhost6.localdomain6> <530DD06F.4090703@users.sourceforge.net> <alpine.DEB.2.02.1402262129250.2221@localhost6.localdomain6> <5317A59D.4@users.sourceforge.net>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 21 Nov 2014 23:57:28 +0100
The unw_remove_unwind_table() function performs also input parameter validation.
Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
---
arch/ia64/kernel/module.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c
index 24603be..30ff27d 100644
--- a/arch/ia64/kernel/module.c
+++ b/arch/ia64/kernel/module.c
@@ -946,8 +946,6 @@ module_finalize (const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mo
void
module_arch_cleanup (struct module *mod)
{
- if (mod->arch.init_unw_table)
- unw_remove_unwind_table(mod->arch.init_unw_table);
- if (mod->arch.core_unw_table)
- unw_remove_unwind_table(mod->arch.core_unw_table);
+ unw_remove_unwind_table(mod->arch.init_unw_table);
+ unw_remove_unwind_table(mod->arch.core_unw_table);
}
--
2.1.3
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]