From patchwork Sat Aug 20 15:26:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9291731 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 EECE660574 for ; Sat, 20 Aug 2016 15:28:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA52028C4D for ; Sat, 20 Aug 2016 15:28:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA85D28C50; Sat, 20 Aug 2016 15:28:56 +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 487D328C4D for ; Sat, 20 Aug 2016 15:28:56 +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 1bb8B9-00059L-OA; Sat, 20 Aug 2016 15:27:23 +0000 Received: from mail-pa0-x241.google.com ([2607:f8b0:400e:c03::241]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bb8B7-00058L-Kt for linux-arm-kernel@lists.infradead.org; Sat, 20 Aug 2016 15:27:22 +0000 Received: by mail-pa0-x241.google.com with SMTP id ez1so5084063pab.3 for ; Sat, 20 Aug 2016 08:27:00 -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=7lhA9Iupw9NVO5wXO9xu7Ez+437qp4qtIwmK2itggQs=; b=UbaXCpyHKnIea2bPI2qMZdLYmvk2oj6qxWK1gi5QMdv93ECbcoGnDdhsC2lmkp/NEa 18O9N9OhHRmiK5kGncPC0QX4Ax4xdVzjXz5t5zTXFB5bEey+xoceWT7b9O7B8q0QwrJg YKyaMPLSRfo85qcSPPtO+iIO4uZ9S9z9Pfpu1pn83EdJ1Oo0l4fjs+8jJOXJV9osoaBn UvhYk+5ZufoSTO96+BDyTnkyAS0KzENoaFmA0eP0T0NekYwrleP2UV0o3m8jL4G111kA VrRSto5mYV6e06GgBl7J9SLyjvzsgxuTX5iiS+nObJXILXo9zQs28iMHX5wqXpHqcB/7 hahQ== 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=7lhA9Iupw9NVO5wXO9xu7Ez+437qp4qtIwmK2itggQs=; b=SxjgwqdseSw0HKmObR2pY8y6UhBAQMKXR1thooVJVJtlWmjpAzXXMosbZCIiIQzksV W8SnbzceBYZXQ3yDtUv/cdGdIKhhaVult84HcHovQR/0kYUF/PPy4iRAFTQoZZYsxUWm l3TZPKozSK87DITOMBXHBoPk4lQHimqzTYL5iYoh/r6rGLRni6ySu8DnFBIN52o5GkoG 46C/md2d9cySbVpL/pcqb4Zq1kZot/r8FAtwBHtlDKO+5nTPQz+60hLah0Eew9X1bCH/ AIESfE4IHrB8gAYt0ck4lMsQBz1i40i16McUWgOJLcYyyHLruOGjx6oO2VgKqi7IQOwd 1KWQ== X-Gm-Message-State: AEkoouvrsMillE/Tp+8TXLsT3k2ExkJA7OPraBrvnaWFbxrd6nGvqfCVGY5QzIzdqWHpag== X-Received: by 10.67.3.197 with SMTP id by5mr24466482pad.119.1471706820552; Sat, 20 Aug 2016 08:27:00 -0700 (PDT) Received: from localhost.localdomain.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id f3sm14865968pff.26.2016.08.20.08.26.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Aug 2016 08:27:00 -0700 (PDT) From: Wei Yongjun To: f.fainelli@gmail.com, michal.simek@xilinx.com, soren.brinkmann@xilinx.com Subject: [PATCH -next] net: phy: Add missing of_node_put() in xgmiitorgmii_probe() Date: Sat, 20 Aug 2016 15:26:55 +0000 Message-Id: <1471706815-27723-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-20160820_082721_754345_71059024 X-CRM114-Status: UNSURE ( 9.06 ) 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: netdev@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 This node pointer is returned by of_parse_phandle() with refcount incremented in this function. of_node_put() on it before exitting this function. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun --- drivers/net/phy/xilinx_gmii2rgmii.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/phy/xilinx_gmii2rgmii.c b/drivers/net/phy/xilinx_gmii2rgmii.c index cad6e19..4f05e5e 100644 --- a/drivers/net/phy/xilinx_gmii2rgmii.c +++ b/drivers/net/phy/xilinx_gmii2rgmii.c @@ -75,6 +75,7 @@ int xgmiitorgmii_probe(struct mdio_device *mdiodev) priv->phy_dev = of_phy_find_device(phy_node); if (!priv->phy_dev) { dev_info(dev, "Couldn't find phydev\n"); + of_node_put(phy_node); return -EPROBE_DEFER; }