From patchwork Mon Oct 17 14:58:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9379547 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 B5353607D4 for ; Mon, 17 Oct 2016 15:00:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5E9829197 for ; Mon, 17 Oct 2016 15:00:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9A96429309; Mon, 17 Oct 2016 15:00:32 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1573B29197 for ; Mon, 17 Oct 2016 15:00:30 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bw9Ne-0002ah-Q4; Mon, 17 Oct 2016 14:59:10 +0000 Received: from mail-pa0-x244.google.com ([2607:f8b0:400e:c03::244]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bw9NZ-0002PJ-1q for linux-arm-kernel@lists.infradead.org; Mon, 17 Oct 2016 14:59:06 +0000 Received: by mail-pa0-x244.google.com with SMTP id os4so5247390pac.3 for ; Mon, 17 Oct 2016 07:58:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fCrYgVt9CFQvMACGRLFkAql5iyDo3/hW0nQD9uegz8I=; b=zCQg86EA5LDvWWMIxdh4Zt7vib2NKqW1r1sSk5mElEy5XfXzj/38vvXT3koxcWK72E KwlYtNaDWKxQRctWC95G1026eVPT2wK/PhaQ5ZmEqgVDf5f09tT7b68VAcfCEccR8Ed5 oMWWJOzRMmsfWm/3VgzfuKOfP+RNWgZdfdW5vyq6hapDkiQ+oCqWcqayOSHljkFX1T2+ ZINd9DnKCX9Wz7a0OICd+y+fo+kdxcne5Hmu+T1PmZ2bOyJxyCWFaZAuWOPo0dG94aER cQjTaOYw3QHc9CyyaHcT7TXTv+WuephxpjrngXPZf2/+Fg2CgpXqRKdTzoUaxdC82KVS 9GiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fCrYgVt9CFQvMACGRLFkAql5iyDo3/hW0nQD9uegz8I=; b=ZXQvi7JRW5hSn8I144tSs1o8KD8XIhQT/lCGri5KdvrDiCKHwqkIz8Y3Pnd4jNSrNB xYTBmj9fXbqjKgiUBy7ayDYO8+HWDzx7DwjvOIOBPIQ5bPjDImE2+66fTZpxpWG3vDkO E8ZEa8/V1YHhs5rLrOICMNn4FAVpBfZW3ev1VMDqYr3zUwtZZNv6pcijeJUIiYDBj52b DVTIjALI/yPGOqQSUJp8tCAJUkCCSKubbJGTrEKYM5mntzD2Goxee/VXd1VRmbUDW0nE o12gGecQJyNZhzZRMxeU5BR2h6QoVxIj/sQdScpGrY9yLxC56V+ATuRL9KHhun57HcIE Ec7w== X-Gm-Message-State: AA6/9Rm+igTxOJEbkFAESWhG/gMNpenArPK6YNYIr+4e6tHTp2Qm7dUekm0KuiQcz9efYQ== X-Received: by 10.66.246.46 with SMTP id xt14mr12815955pac.113.1476716324458; Mon, 17 Oct 2016 07:58:44 -0700 (PDT) Received: from 192.168.0.37 (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id d79sm6428427pfj.68.2016.10.17.07.58.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Oct 2016 07:58:43 -0700 (PDT) From: Wei Yongjun To: bhelgaas@google.com, michal.simek@xilinx.com, soren.brinkmann@xilinx.com, bharat.kumar.gogada@xilinx.com, robh@kernel.org, paul.gortmaker@windriver.com, colin.king@canonical.com Subject: [PATCH -next] PCI: xilinx-nwl: Add missing of_node_put() in nwl_pcie_init_irq_domain() Date: Mon, 17 Oct 2016 14:58:17 +0000 Message-Id: <1476716297-31808-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161017_075905_176402_BF1D6A37 X-CRM114-Status: GOOD ( 10.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pci@vger.kernel.org, Wei Yongjun , linux-arm-kernel@lists.infradead.org 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 From: Wei Yongjun This node pointer is returned by of_get_next_child() with refcount incremented in this function. of_node_put() on it before exitting this function on error. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun --- drivers/pci/host/pcie-xilinx-nwl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/host/pcie-xilinx-nwl.c b/drivers/pci/host/pcie-xilinx-nwl.c index 43eaa4a..c16b26c 100644 --- a/drivers/pci/host/pcie-xilinx-nwl.c +++ b/drivers/pci/host/pcie-xilinx-nwl.c @@ -535,6 +535,7 @@ static int nwl_pcie_init_irq_domain(struct nwl_pcie *pcie) if (!pcie->legacy_irq_domain) { dev_err(dev, "failed to create IRQ domain\n"); + of_node_put(legacy_intc_node); return -ENOMEM; }