Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp376912img; Thu, 28 Feb 2019 00:40:18 -0800 (PST) X-Google-Smtp-Source: AHgI3IYzjOnN/Opwkhw/f2+0puFYhvdGjjPjR4iQk3u9maE7+Jl/FML7zFX7bO3VceF9dztfe35Z X-Received: by 2002:a62:1992:: with SMTP id 140mr6247522pfz.33.1551343218499; Thu, 28 Feb 2019 00:40:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551343218; cv=none; d=google.com; s=arc-20160816; b=Kz340QU802vT79uWzP3nuxUm3cpJRco3iNxXwUr4PzquSZ+ri9JLwp8eR/K3l5K2wf KmrHNJ1mPHaIJU93gT9gICJvWdt5mld474wPetFNbzpcSwgajN1lhRS5lPNIov1VW6kQ ed5v/cU9Gp5iFqyUF4f2aneBxvFv/2FCr5o0hbdpHYaWGbHjy1fQBXPuofq2ebJNrYR5 gj8XaFJ7++92f/QFTy1/+Mr1Hi2hfK5mOPIyGLLuu4tsg3wnqmgrYwLR3XsNCUq3p54G 7/65GSdSvh0DCCUTD0MTaBY3JU0T979MlgLB2z3oygurBmAmSmq/szfUSYEtS/qHEybQ riGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:user-agent:cc:to :references:in-reply-to:from:subject:content-transfer-encoding :mime-version:dmarc-filter:dkim-signature:dkim-signature; bh=rBoi9uBuJA+v/ZfgBq0VcEjZz4uow4GVrUHXzkkO5SE=; b=OA+8GCVizt/hcP6H2DUVLDX6Hd+dF1P9VKLHScTMcqc1ubWjM6TfTmQRPZtt0kdjuh 3Q2LfQ1HTHJEx2AumY0W+mHFN9riy4UmuuLRSaDI3LO/5BNOV4t0dwHr4Hrj9GDlcUBF d85QFgBwzwJa1OJiiwAEsVLawYYPtv8NT7TWSyY5Wj/H+5r7sLLAyAlqxaohh19x4ck2 TzFtgqyVc67OPIM47k5mS5r2I2+4mHZJas2+KUZjknojsb3INRR4/qdpXIqsamjO2nGY zWv1Ru7KM0GtauiiR1Ev0HiDpy+4YiHSn/ckqsD2cFxaPrtiDVk9z3rTpr7fwFf26gey yEFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=fyrgMu+S; dkim=pass header.i=@codeaurora.org header.s=default header.b=NiLBJja8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j29si11577452pgi.449.2019.02.28.00.40.03; Thu, 28 Feb 2019 00:40:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=fyrgMu+S; dkim=pass header.i=@codeaurora.org header.s=default header.b=NiLBJja8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731179AbfB1IjH (ORCPT + 99 others); Thu, 28 Feb 2019 03:39:07 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:59064 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726066AbfB1IjG (ORCPT ); Thu, 28 Feb 2019 03:39:06 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id DB24460F3D; Thu, 28 Feb 2019 08:39:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1551343145; bh=6oGjoUb6vPV6mXBqiIySFbbskd5JDkOO7r7AqQsM+8M=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=fyrgMu+SwdzKGBHTSrDkki2Oi8sEYc6Hn54DKIVdM5ybj/pHafKG8YBbvGgyEnc1i MxEI3RgHmLWnKz86V+FYW7IFRKLY+Xjsoo1Ew1eyDKoy6NivMTBCt1L9YvbjpMh0pR REn5TI07BZCIich9Db53cQdbyS3iDkyCLyBi9g+I= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MISSING_DATE,MISSING_MID autolearn=no autolearn_force=no version=3.4.0 Received: from potku.adurom.net (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 94E2B608CE; Thu, 28 Feb 2019 08:38:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1551343143; bh=6oGjoUb6vPV6mXBqiIySFbbskd5JDkOO7r7AqQsM+8M=; h=Subject:From:In-Reply-To:References:To:Cc:From; b=NiLBJja8px4RzW7V2HuzTLV20UOZj8gds6SLwZIVU/qjzVjBa86j8C+SvZqS1b5ca DmlgM2aJ1fqDLG2TDivC06tbKvXO9y7XRiXXGLH7Xxmt5hQCN+XV+kU/M0YWlnKrZG DFIicHwIxoc9sA+YqY/be5xQs2zFGzT6T9EXAhDU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 94E2B608CE Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH 3/5] mt76: fix a leaked reference by adding a missing of_node_put From: Kalle Valo In-Reply-To: <1550819742-32155-3-git-send-email-wen.yang99@zte.com.cn> References: <1550819742-32155-3-git-send-email-wen.yang99@zte.com.cn> To: Wen Yang Cc: linus.walleij@linaro.org, andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, alexandre.belloni@bootlin.com, UNGLinuxDriver@microchip.com, nbd@nbd.name, lorenzo.bianconi83@gmail.com, matthias.bgg@gmail.com, linux-wireless@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, anirudh@xilinx.com, John.Linn@xilinx.com, michal.simek@xilinx.com, wang.yi59@zte.com.cn, Wen Yang User-Agent: pwcli/0.0.0-git (https://github.com/kvalo/pwcli/) Python/2.7.12 Message-Id: <20190228083905.DB24460F3D@smtp.codeaurora.org> Date: Thu, 28 Feb 2019 08:39:05 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Wen Yang wrote: > The call to of_find_node_by_phandle returns a node pointer with refcount > incremented thus it must be explicitly decremented after the last > usage. > > Detected by coccinelle with the following warnings: > ./drivers/net/wireless/mediatek/mt76/eeprom.c:58:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 48, but without a corresponding object release within this function. > ./drivers/net/wireless/mediatek/mt76/eeprom.c:61:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 48, but without a corresponding object release within this function. > ./drivers/net/wireless/mediatek/mt76/eeprom.c:67:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 48, but without a corresponding object release within this function. > ./drivers/net/wireless/mediatek/mt76/eeprom.c:70:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 48, but without a corresponding object release within this function. > ./drivers/net/wireless/mediatek/mt76/eeprom.c:72:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 48, but without a corresponding object release within this function. > > Signed-off-by: Wen Yang > Cc: Felix Fietkau > Cc: Lorenzo Bianconi > Cc: Kalle Valo > Cc: "David S. Miller" > Cc: Matthias Brugger > Cc: linux-wireless@vger.kernel.org > Cc: netdev@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-mediatek@lists.infradead.org > Cc: linux-kernel@vger.kernel.org Patch applied to wireless-drivers-next.git, thanks. 34e022d8b780 mt76: fix a leaked reference by adding a missing of_node_put -- https://patchwork.kernel.org/patch/10825315/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches