From patchwork Thu Jun 25 11:40:31 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: 6674931 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 CE6F69F1C1 for ; Thu, 25 Jun 2015 11:43:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 109B620618 for ; Thu, 25 Jun 2015 11:43:24 +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 22B092060D for ; Thu, 25 Jun 2015 11:43:23 +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 1Z85Wr-0000P6-HI; Thu, 25 Jun 2015 11:41:13 +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 1Z85Wo-0000J3-47 for linux-arm-kernel@lists.infradead.org; Thu, 25 Jun 2015 11:41:10 +0000 Received: from [192.168.1.2] ([77.181.56.149]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0Meje0-1ZRpKI2oNE-00OGw4; Thu, 25 Jun 2015 13:40:38 +0200 Message-ID: <558BE8AF.5000709@users.sourceforge.net> Date: Thu, 25 Jun 2015 13:40:31 +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: Tony Lindgren , Russell King , linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Subject: [PATCH 2/2] ARM-OMAP2+: Delete an unnecessary check before the function call "of_node_put" 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> <558BE713.1020409@users.sourceforge.net> In-Reply-To: <558BE713.1020409@users.sourceforge.net> X-Provags-ID: V03:K0:uWHs0BX28gKk8hwdPsrmKiptlIH+ySOCfK4fhMehjv2HtJV1Toz v2RZPO2M8jR0WTYt3H7PMyQlm2pJan905B/m45iwBdWv8uP1oo1tigoL9a80hmyG63/DHcD Fu0nBeAQgrfMPJGRCt0EY01rWqwtNhrCIrnLTkEBqvAnXapSdU5jq3PqiGcl+pssD5y4Mfe vKMuwR4ddoMYbEDJ/QUlQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:HNVU2E87vDU=:SK7S2fc/BbUYLnNS011pgG 3p6yrmdJdJnecQwdTR92yqwoHQ45cZOVJsGknjGT6SovDAxi7DI9X5QTjkOvKnUkyU+28v3f+ Z/i2Fq1BbTGpY1A8bYo38+yiSeQirU6aHE+H7D7L9r7Ex06SYMAl3mxv82+eOFxl+3JPhc/b1 QuZoFSGIJ/LAwmWm8/a2NY+WtvRbNSLxNHBzrWbRwi3DzWfN/LMlJpBLXH9LPRQOdvIMIHSiS 9Km521BqdcHhHZw5gQumA4MFpCA+tMtDaMaSeNXJpJXVxov7VtTRAM2hHsRZ89W3IcaOEmIEM cJrLTLwRP0f5cdW6oy0XwsAN1JfDnSb+nFr0tkFpQitojeOQ92Vgx9jyHn+HD80pnTJ1UucsH DKV8w7TfGx/Lne9R56/WGZp5PURJILoO5nU5wyhFmM61RLR3lyzcu1adw6+6nCsgxhtJtf8+7 lHqJWkAuf/4VKD+plhaQfQoQdvawhlKbJmDgQMXViaSNWdXCBPQKA3qdf3lJccq0Q0a87iX8A 8hcDKF1WkO4DVX7PewRyO65gpJpX7yhJD+2jHjKcjozaqIArJ2NUdBxqhIJzj305QGJWKiL5k 3xKxV49lqO4vkTTW0LTUzKnca7UVk4335ler3DCifvfyijwDJdL66yNqGrSEzI8W+NGBQX1LQ 1O1c+MSAjUxcwPFuij+7QKRVADDOax3mHJDiknfVlW9eJRCIbUuUhXVhVsZ0f76ixcD4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150625_044110_573385_32194CF4 X-CRM114-Status: GOOD ( 13.06 ) 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 13:05:28 +0200 The of_node_put() 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/mach-omap2/timer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index cac46d8..15448221 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -208,8 +208,7 @@ static void __init omap_dmtimer_init(void) /* If we are a secure device, remove any secure timer nodes */ if ((omap_type() != OMAP2_DEVICE_TYPE_GP)) { np = omap_get_timer_dt(omap_timer_match, "ti,timer-secure"); - if (np) - of_node_put(np); + of_node_put(np); } }