From patchwork Wed Nov 21 12:43:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 10692527 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B9ACD15A7 for ; Wed, 21 Nov 2018 12:44:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A747C2BA07 for ; Wed, 21 Nov 2018 12:44:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9B1C82BA0A; Wed, 21 Nov 2018 12:44:06 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 966CA2BA07 for ; Wed, 21 Nov 2018 12:44:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=kd9LtRL5PC2tI1q3Y9g720zro37TQJQR74OTtxU5AMY=; b=Fa3 9m5qeRVjOt3AEGmIQX80hUYJitCxtggEFk2mruKjTVqymPt8zNGgpUcFG7yjkdx0ZE5eUHQp4kV+U IPW4UrJHPAUcj8bC5Xp5AQebb9+pcYEqy/E2weQ0iWN1lw2Fiy+3CNSRmIuLvquQ2ho7vyOyKhpkZ YaSy3uywRN9imQ9YooSid41JecS2byYOrt+jcU7C5mh4NwoMkDdLygtEN4DzFgtfUutqovZvreNf6 8+zU7whdDzSaXDB3kQyiz/78UDSYHcCCvrnA0Uvn1wDGgnorlCokAKUQnqF0Rxs2JMO6R1u5IZmZ5 OQiXcs4DjJeQnmsNUk4zL9Ra1mAdyOQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPRrL-0008I9-1E; Wed, 21 Nov 2018 12:43:59 +0000 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gPRrI-0008GQ-3X for linux-arm-kernel@lists.infradead.org; Wed, 21 Nov 2018 12:43:57 +0000 Received: by mail-pl1-x642.google.com with SMTP id z23so5419457plo.0 for ; Wed, 21 Nov 2018 04:43:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=UWJmw+YwW/0Ds6hjqIdSq52nGa+a4aC++4JYMN3iXwY=; b=m6YkTTbOtI3oq2QnWFp4iiKTAPzieXxRlRQ80OH10x9HhwrwDfqUPKRyNT0YOD/iUl r59QyC/zSIndf2BJrQEsQQF45ckjR4XXLcw0YU5UKbKvljpKqBEGfLvwPf/1l5MkkoPo VYlrKgWFU2msJmOyi62/YbpO96QcAxqQ61DrF4deLO323PUhesBo+0nATVFj3WJIYlC6 ZbjTTcASjuctAVAw/Uf4E7mDp+BifDC1LD7HukIoDyTr/H9wQJEqDZ8jWFMXTj6sG+jR KeGJK1dmaYSu61LYwg1zDsFmqaWbUJxPr+OqJmvfUdsNlbIyQnY/OpjvYXRS4cb0dqIP rjfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UWJmw+YwW/0Ds6hjqIdSq52nGa+a4aC++4JYMN3iXwY=; b=tzsjeAu/G7ifrB5kWwAu1wGeOB7JerSNfB+/j0PtbhY0NRnD2ObzSf7NsTyySvlMMh Lq8AbK9S50Fmz3UhJrpP/wDsE4LpsFet+7CMw5QJkd3Yy6dpMDOrCPMIw1JG2sS15svl r8c+HZ7XtqbeqLvZpnrCDs6IgLd/+a18pg8u3dC5cbDh4YXGCc7Yq1G+Fm/leT31cF0R kFrxzBBIUV8Q84skVrJSyAUmpQOf1XfXqqFcrey+xcXKbSwCb0FM7CzVsWdhWmzGSrah cKY5lB7qgA5JAs1+8sVTyDaZ2o4NImv1yhDa3s0WSKypM3t631o2CFkd479vpQr50/rF /opQ== X-Gm-Message-State: AA+aEWbZlOmDXz3Z/iQwRTgafVa2/FBany1BHYgRZcfQyO/kfTdSTiYh TNVmgg3qzk5Wo/J3Spdg1GY= X-Google-Smtp-Source: AFSGD/VWi0i5Kd4M8LOiNu/fW3mVIr41MdrJ4kKRRpgiKCg6JQgXZvRL+fpn8tS4tb0SpKGCkUD+gw== X-Received: by 2002:a63:a35c:: with SMTP id v28mr5792926pgn.205.1542804225653; Wed, 21 Nov 2018 04:43:45 -0800 (PST) Received: from localhost (68.168.130.77.16clouds.com. [68.168.130.77]) by smtp.gmail.com with ESMTPSA id s62-v6sm56954420pfb.73.2018.11.21.04.43.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 21 Nov 2018 04:43:44 -0800 (PST) From: Yangtao Li To: computersforpeace@gmail.com, gregory.0xf0@gmail.com, f.fainelli@gmail.com, bcm-kernel-feedback-list@broadcom.com, olof@lixom.net, treding@nvidia.com, arnd@arndb.de Subject: [PATCH] soc: bcm: brcmstb: add of_node_put() Date: Wed, 21 Nov 2018 07:43:42 -0500 Message-Id: <20181121124342.21987-1-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181121_044356_139997_038E6502 X-CRM114-Status: GOOD ( 11.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Yangtao Li , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP of_find_node_by_path() acquires a reference to the node returned by it and that reference needs to be dropped by its caller. bl_idle_init() doesn't do that, so fix it. Signed-off-by: Yangtao Li --- drivers/soc/bcm/brcmstb/common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/soc/bcm/brcmstb/common.c b/drivers/soc/bcm/brcmstb/common.c index 14185451901d..95b777fffee6 100644 --- a/drivers/soc/bcm/brcmstb/common.c +++ b/drivers/soc/bcm/brcmstb/common.c @@ -32,12 +32,15 @@ static const struct of_device_id brcmstb_machine_match[] = { bool soc_is_brcmstb(void) { struct device_node *root; + bool rc; root = of_find_node_by_path("/"); if (!root) return false; - return of_match_node(brcmstb_machine_match, root) != NULL; + rc = of_match_node(brcmstb_machine_match, root) != NULL; + of_node_put(root); + return rc; } u32 brcmstb_get_family_id(void)