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: 9379529 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 54180607D4 for ; Mon, 17 Oct 2016 14:57:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45C3B29197 for ; Mon, 17 Oct 2016 14:57:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A5B8292FC; Mon, 17 Oct 2016 14:57: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=-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 01B0729197 for ; Mon, 17 Oct 2016 14:57:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933440AbcJQO5p (ORCPT ); Mon, 17 Oct 2016 10:57:45 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:33631 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932489AbcJQO5o (ORCPT ); Mon, 17 Oct 2016 10:57:44 -0400 Received: by mail-pa0-f66.google.com with SMTP id hh10so9329994pac.0 for ; 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=jHbbhVjm0eheBB7iN0ycUpc0PyX/LB+oWhSQctw+IgbcjXeCs8jFE6O6ktceyrvRLr vsxd5IFgJD8aDTe1Ik9Gvy1XVe9ubdEC5xneJV0N/WSqPBOBc1kV0VqnWOQS/om11sKh lNZZIKCY+ZsbvkIMDX/CqnOU4nJaS1Gfa1emq4FtQWjME0DRgs2jFuwiNYCgYdLqUISX UL7HyY1E1rM8hC8AMohwh/OsKpdMKgrQinXd9ZMMPG6zHnpxtEjA83c+XPkfJi/ADRPx M+r04OzI7e+dMZ1EVQiqEVl4Lbkc7c9K9qRDmABHvc/16nAHJniR/DHOjn7+vlIfja5h v8YA== X-Gm-Message-State: AA6/9RmtYsOitqgdeMeMvFZQbrsoC3lkAOTfllwleQwUEB+l0eTakuOG1VwZOO23u70qOQ== 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 Cc: Wei Yongjun , linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org 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 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 Acked-by: Shawn Lin --- drivers/pci/host/pcie-rockchip.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-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; }