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 9A688C433F5 for ; Fri, 22 Apr 2022 06:23:45 +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:In-Reply-To:MIME-Version:References: 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=Bhpim3juF29Edz/I329Ea71a0CakjTTIKbTSF1yg9QY=; b=QHiUgEPvp8r8vc zTlfoRDnP63ESsXL3YARANAkv8hZf6pHvMpIftpyoX1Mp+aNGQfQUWRtSXyeMEjEFu1JVkDzE3P6W CJoewE+JSKo9N4cg6pjQR194Dppu40ZDOqP4DOY6C/cTYhw+hcnSkFseC4s9cuoQqpyVjzlmeh2Bo XORXd5La45NMzphXpO25IcdD/cPeDisIcBmqqMVcpHQ10xuWhggWwJ8uusCNz2hnblC0XHZumFOKV amkviK1wKL7jbJM01tZ0iZP9/gVuJKPLPfobuoPFHSVLVIVXHgAgE5HV+kzhHMUooe5HocxXz0Dtn 18BzLysB2j2r6wPERRPA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhmgS-00GUpo-Am; Fri, 22 Apr 2022 06:22:25 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nhmUi-00GPIm-Ex for linux-arm-kernel@lists.infradead.org; Fri, 22 Apr 2022 06:10:17 +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 dfw.source.kernel.org (Postfix) with ESMTPS id BFDA061DC5; Fri, 22 Apr 2022 06:10:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0649C385A4; Fri, 22 Apr 2022 06:10:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650607815; bh=MJyZJeaFrRIgBTeVkPLy57xZQnMw1BKj1OB3B3uCgf4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IY4Fg2MiVAFQ098Mu1llqTZ4El90rKHVtoud/3uo5fa+pG5bP87H73olcGwr3WFtF 1FU2wR5WKdvEN9R73qU3Ij08EmCCrmXWnjEwgsJrjQG5bMLCPaChY6xJr21X9+Byb/ Tv1RxitzFRmAEXjnHwoduy8rzzvgFusWrCFW23pnDVTAu7lKt6lhSTAE2CDAerbonA 0QrzmAO/1j7Eb6HK22cXP01WfVo3Du9QiG1hIPexRUU0PTPHLwMOaaEJbRQONsXuoh eydAWkbLCPxwN+ONB8ue9y0GQQBk7nU+ydcWpWJnJwxuRfWnI4nUz7vNosfVu3t0m2 xCyjRGxgT75+w== Date: Fri, 22 Apr 2022 11:40:11 +0530 From: Vinod Koul To: Haowen Bai Cc: Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dmaengine: imx-sdma: Remove useless null check before call of_node_put() Message-ID: References: <1650509390-26877-1-git-send-email-baihaowen@meizu.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1650509390-26877-1-git-send-email-baihaowen@meizu.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220421_231016_575978_9709306F X-CRM114-Status: GOOD ( 16.67 ) 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 21-04-22, 10:49, Haowen Bai wrote: > No need to add null check before call of_node_put(), since the > implementation of of_node_put() has done it. > > Signed-off-by: Haowen Bai > --- > drivers/dma/imx-sdma.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c > index 6196a7b3956b..b8a1299b93f0 100644 > --- a/drivers/dma/imx-sdma.c > +++ b/drivers/dma/imx-sdma.c > @@ -1933,8 +1933,7 @@ static int sdma_event_remap(struct sdma_engine *sdma) > } > > out: > - if (gpr_np) > - of_node_put(gpr_np); > + of_node_put(gpr_np); this is incorrect as it is called on error case -- ~Vinod _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel