From patchwork Mon Oct 17 14:54:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9379511 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 462A66086B for ; Mon, 17 Oct 2016 14:55:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 36A282922E for ; Mon, 17 Oct 2016 14:55:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2952229306; Mon, 17 Oct 2016 14:55:05 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 AD3F42922E for ; Mon, 17 Oct 2016 14:55:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753482AbcJQOy6 (ORCPT ); Mon, 17 Oct 2016 10:54:58 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:33294 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757865AbcJQOy5 (ORCPT ); Mon, 17 Oct 2016 10:54:57 -0400 Received: by mail-pa0-f65.google.com with SMTP id hh10so9327760pac.0; Mon, 17 Oct 2016 07:54:57 -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=Qz7fSJoTO+ar7yqttOmmCFHWXjcCxw8gvDr+RbhaMGc=; b=eafL7GyoEUlsJhzfiA56o5UDlatd6wy79dJl/YBPzUMm8zbiZTcV2xqwDPwFboDe0U J++R+EZ9pBc16Zrhpf+tSNV4beFZJSoKwY2H0Sq82PuFOMuDfarWQvhUCWA/KR3W0ORw w2h6vkUnjE9+IyyJUWIhQV50hLA5QpsCCZG+MsdWj5wwU0YkJStxrWMtcsBB4NDD5L3W Kcu93wlTl+hNp01BziiZZ51iUYZ2Efpnd9vFRkyedcMm35KEICyeSZQYiw0OKETVM0sf tPtcpM9hqnZgP6/zfgZ3PneeXm2SKCluompNCazgEAXmjr9oI4ua2VkoCEfWFGSbwQBg VZMg== 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=Qz7fSJoTO+ar7yqttOmmCFHWXjcCxw8gvDr+RbhaMGc=; b=DTNY40MIWDKryqKUqeO6vlgeDnRZPmsXaj3Xblh56SYV+b16Eqf0wwcmbjzpFyKXkg FfYordWc8rJbNp0K3fs7hAN5qUlSyDvjePkG89shabpEMb/F5vZSE9Stkw8NgF9fhjRY DpBRFCkl0hwrlLfhZvxLJRnHaSig391Z+llAGc+pVUGgsqLqY4UPgS7WDmSfmqcZqQRP c9x+Y1ccPtcamxB6BoAssQuxZ2ebyQGc6A6IdBEkmnENM38lB6UIrw6r9wmovDaAiHiG cewb+ZbPkdzjVzriZZsbHHK0ZsoMRBwIRONiHRvQuw19imN+TUDD/K93Po17uMiOo2+t KGBg== X-Gm-Message-State: AA6/9Rlxd7/pgY44dt3HfJuXVSnNmZiwTYFNQic+FviCzCmAD3aZTjZ9x3BB0EsNmQbAlQ== X-Received: by 10.66.154.202 with SMTP id vq10mr29211595pab.0.1476716096787; Mon, 17 Oct 2016 07:54:56 -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 70sm48772032pfc.50.2016.10.17.07.54.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Oct 2016 07:54:56 -0700 (PDT) From: Wei Yongjun To: Kishon Vijay Abraham I , Bjorn Helgaas Cc: Wei Yongjun , linux-omap@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH -next] PCI: dra7xx: Add missing of_node_put() in dra7xx_pcie_init_irq_domain() Date: Mon, 17 Oct 2016 14:54:37 +0000 Message-Id: <1476716077-30379-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/pci-dra7xx.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/pci-dra7xx.c b/drivers/pci/host/pci-dra7xx.c index 9595fad..79297e9 100644 --- a/drivers/pci/host/pci-dra7xx.c +++ b/drivers/pci/host/pci-dra7xx.c @@ -177,6 +177,7 @@ static int dra7xx_pcie_init_irq_domain(struct pcie_port *pp) &intx_domain_ops, pp); if (!pp->irq_domain) { dev_err(dev, "Failed to get a INTx IRQ domain\n"); + of_node_put(pcie_intc_node); return -ENODEV; }