From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2D76EC433F5 for ; Sun, 22 May 2022 11:40:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Xrc5rAebnwgkUhOCOWVlvW1PvEeCR/LcfUumr+Q5YUg=; b=iToHBvK8x/4Zgc X/opxluDlnKvc5UiZVrTbw/i/YxffFDpTVPuMWcXX8YA/8pU1yF8VBltH1ngzqfDqjpylSqGfNi3l +j8Of8Jj/TVoZt48zAHFzRjhUOiFqK2+KYboqGi/Zwjvlb/O1jYbc/nQX8/HA7OXdpPrfrkDpropH NdNUofTkb0nONhPGGAIUvwHGmoRFmvk2/ELloLDeENgtRmb9eezZE82a12cjff4BkdMX+hBASkFZt F9V9fsXhhA+v37SwlorQeZtX0ZQOA/Vinw7va6HS7IdPA4WAMICivC5LvpclSu5C5AX7taV08BxED lbQEbYglmlq5cdtg424g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nsjvi-001CYT-76; Sun, 22 May 2022 11:39:26 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nsjvf-001CXV-BH for linux-arm-kernel@lists.infradead.org; Sun, 22 May 2022 11:39:24 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EA424B80AFD; Sun, 22 May 2022 11:39:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4A55C385AA; Sun, 22 May 2022 11:39:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653219560; bh=R3cMWESMPtbduNLMaekRkB5cyJb+GEmehK1+zJSrB58=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gRd6cnkRR7RnvyvMbZcf9kDtRG4wQIFgPK7fUE8YMQUW3nh7OKk/o5jwdlRonmbkd f16WOfqGqxgpic5zeIAeDtVEnED8jIBwcccLrmCI91zrJlCZuh/BgMLFTXDpxQ4ueH IkUbwDnUWsy3SPKpIMswF0nEv2iLJUfH68SlfFTy5pwdcMO0twrmDgLUuVoRerOuaL 1T1H0H6weqBAGw4Vd0YQaVsmxMxsdD1WPUNKHRhgi5zQfVKkHzORlhY7OWpjkLhzF9 pS4WZGdyTutITsw3euRcqmKpkmEZBJffE7MMx3xWoD5cC8gRjEgDZYmBDIfca0nz8i r9XeecNQrdxiw== Date: Sun, 22 May 2022 12:48:04 +0100 From: Jonathan Cameron To: Miaoqian Lin Cc: Lars-Peter Clausen , Joel Stanley , Andrew Jeffery , Billy Tsai , Colin Ian King , linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: adc: aspeed: Fix refcount leak in aspeed_adc_set_trim_data Message-ID: <20220522124804.7ec5940a@jic23-huawei> In-Reply-To: <20220516075206.34580-1-linmq006@gmail.com> References: <20220516075206.34580-1-linmq006@gmail.com> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220522_043923_648518_6DB6FBAF X-CRM114-Status: GOOD ( 17.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 16 May 2022 11:52:02 +0400 Miaoqian Lin wrote: > of_find_node_by_name() returns a node pointer with refcount > incremented, we should use of_node_put() on it when done. > Add missing of_node_put() to avoid refcount leak. > > Fixes: d0a4c17b4073 ("iio: adc: aspeed: Get and set trimming data.") > Signed-off-by: Miaoqian Lin In the 'hopefully obviously correct' category so applied to the fixes togreg branch of iio.git and marked for stable. Thanks, Jonathan > --- > drivers/iio/adc/aspeed_adc.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/iio/adc/aspeed_adc.c b/drivers/iio/adc/aspeed_adc.c > index 0793d2474cdc..9341e0e0eb55 100644 > --- a/drivers/iio/adc/aspeed_adc.c > +++ b/drivers/iio/adc/aspeed_adc.c > @@ -186,6 +186,7 @@ static int aspeed_adc_set_trim_data(struct iio_dev *indio_dev) > return -EOPNOTSUPP; > } > scu = syscon_node_to_regmap(syscon); > + of_node_put(syscon); > if (IS_ERR(scu)) { > dev_warn(data->dev, "Failed to get syscon regmap\n"); > return -EOPNOTSUPP; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel