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: 6674901 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4F4C0C05AC for ; Thu, 25 Jun 2015 11:40:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7F64320666 for ; Thu, 25 Jun 2015 11:40:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DE55D2066D for ; Thu, 25 Jun 2015 11:40:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751551AbbFYLko (ORCPT ); Thu, 25 Jun 2015 07:40:44 -0400 Received: from mout.web.de ([212.227.17.11]:55581 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751083AbbFYLkn (ORCPT ); Thu, 25 Jun 2015 07:40:43 -0400 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 CC: LKML , kernel-janitors@vger.kernel.org, Julia Lawall 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= Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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); } }