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: 9379535 X-Patchwork-Delegate: bhelgaas@google.com 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 4C83D607D4 for ; Mon, 17 Oct 2016 14:58:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3DF6129197 for ; Mon, 17 Oct 2016 14:58:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32906292FC; Mon, 17 Oct 2016 14:58:49 +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_ADSP_CUSTOM_MED, 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 87BD929197 for ; Mon, 17 Oct 2016 14:58:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754204AbcJQO6p (ORCPT ); Mon, 17 Oct 2016 10:58:45 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:36842 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752427AbcJQO6p (ORCPT ); Mon, 17 Oct 2016 10:58:45 -0400 Received: by mail-pa0-f67.google.com with SMTP id os4so5247391pac.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=Wjb1xp18OJ47lsDDVLGyi/pl7DbHLK2+XC+e/q9p7atfv1/CTPzS74gNMwFnabbtPY e4ymKhkbl6Q6xP5PEV2K2+SU3vsXrgNLCfuxhrYn/Nkq3tHjhZafA4kYdqaHSQJe+FXa 2XeeqSkMqasyKfwvOn2BnPyQT+DbMFtChXqCfDZaMT3BK5Z1IBtS+JbEttuO5EtOLv1q Ywom2E/S2rLzgQ/fBMyxvJMvBiYukHNmhJlehEo1GHMJig12/QN19eOLG/mfzQ9MqeOb hW1mc8dnfk2oooAOLybuTjd1f5iXUrHtjs24VYYB0izv1Dw5cYJ4ThQqRsUjZQN2z8bq 7Lyg== X-Gm-Message-State: AA6/9RkrQqhdo2P6AIM29MSOg/Z09L+5iLrRVfyKTqeZH4MPY9YoTlV2WysmYehiQIg0UA== 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 Cc: Wei Yongjun , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.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(+) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" 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/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; }