From patchwork Thu Jun 25 13:32:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 6675201 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A3B2F9F39B for ; Thu, 25 Jun 2015 13:35:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D2109206E6 for ; Thu, 25 Jun 2015 13:35:31 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 055CF20623 for ; Thu, 25 Jun 2015 13:35:30 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z87HU-0004bT-SI; Thu, 25 Jun 2015 13:33:28 +0000 Received: from mout.web.de ([212.227.17.11]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z87HQ-0004Tz-LK for linux-arm-kernel@lists.infradead.org; Thu, 25 Jun 2015 13:33:25 +0000 Received: from [192.168.1.2] ([77.181.56.149]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0LsyRS-1Yxun93z4M-012UuP; Thu, 25 Jun 2015 15:32:54 +0200 Message-ID: <558C0304.6050204@users.sourceforge.net> Date: Thu, 25 Jun 2015 15:32:52 +0200 From: SF Markus Elfring User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Russell King , linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] ARM-kernel: Delete an unnecessary check before the function call "unwind_table_del" 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> <558C01C5.4060303@users.sourceforge.net> In-Reply-To: <558C01C5.4060303@users.sourceforge.net> X-Provags-ID: V03:K0:v+JK0g+uqVB2J8bteHoQpMg34WJCbZQvsJB7Bkm4yx0muqjR/3k Emvzx78aq1LqcM3AK3MAP5aJrEhDF3GuY/EZ2e7dnV0h2t2uLqwgr9y+qHWvE4nhTvQZps0 3kTJxqURiJ7uaLZo5ZnQ8kiPweslpfTs5hT/bTLQWnjHDJtU4AzySZ+rrGfeq5ux0iXkzYx dAkTn2wMVO3q9Iyulk8jw== X-UI-Out-Filterresults: notjunk:1; V01:K0:GTzpt24/BUI=:gOdxXirHG1gh55AoDgh19v kTETmgHYIsIzwZQnExAhQ4B9luD2ht3ViLyt8TbmmZNoEi9OBWfSTR7r/G1WwW2Rgp84Hqa8p +r3klM1N1ky4jWQA1jJKMWUt2cMLGdCJFUuvJ1g8NxQsoYMH2IA4FBZBHYAtVVlNGIO2lyhRP 5v3wOaszOD0wXD4kmfcYE8SK6ToAoPJRqkiopwXVlFn8leKYNIhPozlXVZdei7UwsxsHlvUoB qwxnyYSqsEArRfz2RuPMguBTZN+VQWKpWp9iezF7vk/A4gqu+oQVrq/R2fIZJVBV7hE0mEuoX rwenGqlo7Gl7VYUMZh/4yPUkFq6cnewrQOaxRN4OItHCrR503ntjBGeY88RiwcAnAZBNgCAkN zzY0hOuD5n9Wd8USVxXseaU9Q4Qi0imzwibJn1wU5dolhWMTpiPKGOwAEw6YYpI/QwjuoNKqJ mG87Hs+Wg5iOhQDlPIHizD6eIftFBuouzg94yQ3BcejDMATRqjwdhTUG2L4wwjrvcYlJTvVqV rATMFZUOX6TOIUmfpcAET51GJNUk/S5rFMSXgzTjua20iH8R00ABz7VNAJFic6+0HhEbV4Z/b pIt90tTdUZ9RYS18yOYvdPZkN0JSTLXZdM1ND1QfwD0D+IIATKgJPAsUHtuG+66ZOamLn4Sg+ 76nnRfksOOFurBl4fyE7xZORIhmsCTSNOvIhloBIdiCiEAta+od2pzxhZirl89ZoBmHM= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150625_063325_079355_C3901EB7 X-CRM114-Status: GOOD ( 12.33 ) X-Spam-Score: -1.9 (-) Cc: Julia Lawall , kernel-janitors@vger.kernel.org, LKML X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Thu, 25 Jun 2015 15:05:21 +0200 The unwind_table_del() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- arch/arm/kernel/module.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index efdddcb..0cc1afa 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c @@ -390,7 +390,6 @@ module_arch_cleanup(struct module *mod) int i; for (i = 0; i < ARM_SEC_MAX; i++) - if (mod->arch.unwind[i]) - unwind_table_del(mod->arch.unwind[i]); + unwind_table_del(mod->arch.unwind[i]); #endif }