From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752672AbaKUXCG (ORCPT ); Fri, 21 Nov 2014 18:02:06 -0500 Received: from mout.web.de ([212.227.15.3]:59131 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751677AbaKUXCE (ORCPT ); Fri, 21 Nov 2014 18:02:04 -0500 Message-ID: <546FC455.8090702@users.sourceforge.net> Date: Sat, 22 Nov 2014 00:01:41 +0100 From: SF Markus Elfring User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Fenghua Yu , Tony Luck , linux-ia64@vger.kernel.org CC: LKML , kernel-janitors@vger.kernel.org, Julia Lawall Subject: [PATCH 1/1] [IA64] Deletion of unnecessary checks before the function call "unw_remove_unwind_table" References: <5307CAA2.8060406@users.sourceforge.net> <530A086E.8010901@users.sourceforge.net> <530A72AA.3000601@users.sourceforge.net> <530B5FB6.6010207@users.sourceforge.net> <530C5E18.1020800@users.sourceforge.net> <530CD2C4.4050903@users.sourceforge.net> <530CF8FF.8080600@users.sourceforge.net> <530DD06F.4090703@users.sourceforge.net> <5317A59D.4@users.sourceforge.net> In-Reply-To: <5317A59D.4@users.sourceforge.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:ThZIE9w7+xaEo4I2rmExrbihB/L8dbB2G5CBkbb1EQ+Z+pNiZy4 vI7ohlLmSrWz7mRB/pijxMUVo+8pGZnQ1JHXv0jJ7ZW/QxAHTxZA9f64hZyxXFfp23STJpi ADPKEr2VKbMRDQjUbpjzS/uvomxxg5g56SeeOYzFkccVnyEXOAXzPEb3+9BjPO0TbFnUYxY H6FYnALmpVOoFW9WO/Znw== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring 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 --- 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