From patchwork Fri Jul 8 13:44:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: weiyj_lk@163.com X-Patchwork-Id: 9220967 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 25FCD6089D for ; Fri, 8 Jul 2016 13:44:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16FD8287D3 for ; Fri, 8 Jul 2016 13:44:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0BB6D287D4; Fri, 8 Jul 2016 13:44:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8BFFC287D5 for ; Fri, 8 Jul 2016 13:44:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932582AbcGHNot (ORCPT ); Fri, 8 Jul 2016 09:44:49 -0400 Received: from m12-13.163.com ([220.181.12.13]:37065 "EHLO m12-13.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932529AbcGHNos (ORCPT ); Fri, 8 Jul 2016 09:44:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=3iGCf jYtxlZOU916qlhTOhGLdMC0Wt3gqSxzfHJHzFA=; b=UwPFnOkYmLJOAuY4zVajj uBlHYglSuXHdkcvXglHbztiXm35IXo7DmBeAOZWQEva1C5lpzLafjDD7tZC2esba yTmHu8k7AwAT3gU36VMI8lVrljykBl5xgD0UWHNUS5lSFnPxDhH6aNdPR3xmxNxb Hbv9MsBsEbUd0z157a3QBQ= Received: from localhost.localdomain.localdomain (unknown [49.77.231.212]) by smtp9 (Coremail) with SMTP id DcCowACnDBYkrn9XLTMZAA--.1570S2; Fri, 08 Jul 2016 21:44:05 +0800 (CST) From: weiyj_lk@163.com To: Chanwoo Choi , MyungJoo Ham , Kyungmin Park , Kukjin Kim , Krzysztof Kozlowski Cc: Wei Yongjun , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH -next] PM / devfreq: exynos-ppmu: remove unneeded of_node_put() Date: Fri, 8 Jul 2016 13:44:04 +0000 Message-Id: <1467985444-9242-1-git-send-email-weiyj_lk@163.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-CM-TRANSID: DcCowACnDBYkrn9XLTMZAA--.1570S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7WryUXr1rtrWDWr1xJw1UWrg_yoWfGFb_CF n7GF9xXr1rta12grZI9r45A3s0yw4I93s3WFWIqrWfJw43Zw45Jr4xZrW2yFWDur4jvrnF yr9IqF40vrWDWjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUnw2-5UUUUU== X-Originating-IP: [49.77.231.212] X-CM-SenderInfo: pzhl5yxbonqiywtou0bp/1tbiRwWg1lc64OsHqwAAs+ Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun for_each_child_of_node() performs an of_node_put() on each iteration, so putting an of_node_put() before a continue results in a double put. Generated by: scripts/coccinelle/iterators/device_node_continue.cocci Signed-off-by: Wei Yongjun Signed-off-by: MyungJoo Ham --- drivers/devfreq/event/exynos-ppmu.c | 2 -- 1 file changed, 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c index 845bf25..f55cf0e 100644 --- a/drivers/devfreq/event/exynos-ppmu.c +++ b/drivers/devfreq/event/exynos-ppmu.c @@ -406,8 +406,6 @@ static int of_get_devfreq_events(struct device_node *np, of_property_read_string(node, "event-name", &desc[j].name); j++; - - of_node_put(node); } info->desc = desc;