From patchwork Mon Oct 17 14:57:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9379543 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 085B8607D4 for ; Mon, 17 Oct 2016 14:59:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF57829197 for ; Mon, 17 Oct 2016 14:59:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E449D29306; Mon, 17 Oct 2016 14:59:47 +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 F272829197 for ; Mon, 17 Oct 2016 14:59:45 +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 1bw9Mi-0002Bf-FY; Mon, 17 Oct 2016 14:58:12 +0000 Received: from mail-pa0-x242.google.com ([2607:f8b0:400e:c03::242]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bw9Ma-000220-JX; Mon, 17 Oct 2016 14:58:05 +0000 Received: by mail-pa0-x242.google.com with SMTP id fn2so8416282pad.1; Mon, 17 Oct 2016 07:57: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=V+i3YGlnQku/7nj+OEI130qVireL0N7uKegPw3HTc4A=; b=FNuOj/xBRo+2VpyKZ5lONb8HY/DFAY20EpkmtqguR7hgojOHqGsqaWiWgWCJvw4pAH zAfjOT2HsuWKzWvGlnuOg8FcFeIZ8XK+S1w9F7LWzR5NjWIn1rPAbJechRhM7qOWLhON BcDwaUH5Twi46KQJhA4YeAjMuqn5Z6y9Wu3omW+Eo3EN8zHqfYjR2VrhDxeEG27OXBYM 3GkpeLHfU6/hE9aG9RSXgjVKSmdWaBn56LZDGEPGwQQqE8EFIFejme1EAYpbG22A3BLh AicHWOjz8vKQu1+PI2QeHuWyq/6vCdjh8lZInQeirKP23xiIOMUCkZWN7gVD62mXgsRS RMdg== 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=V+i3YGlnQku/7nj+OEI130qVireL0N7uKegPw3HTc4A=; b=HhzBD6ZgT5mYBrROZz7niQXTRQXP6uhlgYGQDot9mMuBjV73z7xG4C4gq/ngWjcNCG F/O2lxxMVGtwWvOMZgCpOR9fT6Beyxvuyp+qZBfgQmYwEf0bLypNhkXN8omFQuy9ISmS WT7cj0gd9aFnBDnOzCqCg/gVyD7hKpt5Cpl/Zh0JBLnyzoxA0oVljXjynLwpIBCnwDOK OHyd6WxseD/g6qcTi+6Qgfy1S9evKbwNyKmuA6A9SkE6hCyItSLucwEylBXddE+iembQ 8qc5kQUyrK64bdWoG62/6kmXXknqw2ddX4qGVDLju4519MG+wl3XeqaojP6rU58A7y92 UeXg== X-Gm-Message-State: AA6/9Rm1rDn/V14dICSe914AIicaL05RxamqgpYC9qWCikmfFLy32K3h1Z6wRlOIR7yc+w== X-Received: by 10.67.30.170 with SMTP id kf10mr31741510pad.81.1476716263666; Mon, 17 Oct 2016 07:57:43 -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 tj8sm48942412pab.16.2016.10.17.07.57.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Oct 2016 07:57:43 -0700 (PDT) From: Wei Yongjun To: Shawn Lin , Wenrui Li , Bjorn Helgaas , Heiko Stuebner Subject: [PATCH -next] PCI: rockchip: Add missing of_node_put() in rockchip_pcie_init_irq_domain() Date: Mon, 17 Oct 2016 14:57:22 +0000 Message-Id: <1476716242-31684-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_075804_732394_113B6D5F X-CRM114-Status: UNSURE ( 9.73 ) X-CRM114-Notice: Please train this message. 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, linux-rockchip@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 Acked-by: Shawn Lin --- drivers/pci/host/pcie-rockchip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pci/host/pcie-rockchip.c b/drivers/pci/host/pcie-rockchip.c index e0b22da..ab88859 100644 --- a/drivers/pci/host/pcie-rockchip.c +++ b/drivers/pci/host/pcie-rockchip.c @@ -949,6 +949,7 @@ static int rockchip_pcie_init_irq_domain(struct rockchip_pcie *rockchip) &intx_domain_ops, rockchip); if (!rockchip->irq_domain) { dev_err(dev, "failed to get a INTx IRQ domain\n"); + of_node_put(intc); return -EINVAL; }