Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp2103629rwp; Fri, 14 Jul 2023 00:18:59 -0700 (PDT) X-Google-Smtp-Source: APBJJlGvVkX4SkWirPdYmm8xkoCum8kO/RyT55F1CUJ3E5wXo+B0cpmrcD1s3ipaz3nO937VDzpI X-Received: by 2002:aa7:d903:0:b0:51a:42b2:cb83 with SMTP id a3-20020aa7d903000000b0051a42b2cb83mr2991893edr.42.1689319139245; Fri, 14 Jul 2023 00:18:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689319139; cv=none; d=google.com; s=arc-20160816; b=PZiNmn5RauZ2P/0yQ4lCrCneukkrZa/ll2k0ylK698ndL1Loga+gdT6+6H83Hj0FUP l8/gR9dwtopEw2UrO0tCSI+etOn6wu0pEUebsHgdo+31Jx1swmLSdvgeIEPW7Q9aLh71 QQN/rlHMoO6Rs7rpYJdO/cpORhAvy4wk7BRDwEeVI84jGl8kKx4fy4bss4kDHnqJsdYH IFPFHODKQ4pFiF2BtFr/1Yl2j9Fg6Ce0qKPAS9RZ2+qEE93wIP8xgp0dd6j3HB7U5M3v wF+letYF2WeXEn2J1D1WXE723VzDHQ+WBzgE9TIJOYfUuPKFBFCu122zZ3Qod0VyHCi1 f6bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=zHLVNT4Ib177dr3Dr0VkglUlA6GRR6rwSc8RKuf20vE=; fh=rsEE/BBTydZHSOBD6bNNRoQbh8yRSdumYFIoZfdKyzQ=; b=cLUvVARMgE0rPzzebaxDI9nL9OBfpdCyS1zrAKz7Z92OSMx0rD+Q53dBXSii9nFarK 3VIWOfYvMsK20UZKbjrGokks+zV0T5lpkiMDvo5S+5NeEs9i8AKLl2L9vM2A4/4M1ivN rtQ2dG1aiQg321t2ez5QSSjDihPFLYD4UxMNR9o6BuS4iP5ip39kLgvNnMwHxZENso3A nNPxfgd8P3tppsVOHsGf4kRKRscKuDJjewmad7bemHNU6ZWcRfHJpni+kqx1b0KdtGEZ +4zk3s2HCQko348o6BBhGmk2wtw/KuZtnAETJvrulaPB2kKdXspYIsafn2trP77TM+a5 OKQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa1 header.b=JjWKJR1T; dkim=neutral (no key) header.i=@ravnborg.org; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g25-20020aa7d1d9000000b0051e16e83727si8701460edp.568.2023.07.14.00.18.35; Fri, 14 Jul 2023 00:18:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa1 header.b=JjWKJR1T; dkim=neutral (no key) header.i=@ravnborg.org; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232566AbjGNGsF (ORCPT + 99 others); Fri, 14 Jul 2023 02:48:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234959AbjGNGrq (ORCPT ); Fri, 14 Jul 2023 02:47:46 -0400 Received: from mailrelay1-1.pub.mailoutpod2-cph3.one.com (mailrelay1-1.pub.mailoutpod2-cph3.one.com [IPv6:2a02:2350:5:400::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C91230F3 for ; Thu, 13 Jul 2023 23:47:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravnborg.org; s=rsa1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=zHLVNT4Ib177dr3Dr0VkglUlA6GRR6rwSc8RKuf20vE=; b=JjWKJR1TKMraQKPyb0o1cIyIx1nkuUOkvLCRB769LmWfTe+/QCCx5M2Z2ftVNTnaVW6U8IN2lF99l HYOHwwUuDgyhXmSiVZbLpWpanKMBWWglnCB9E0lY9GOp7tCz/U99hBGlyvcD2PyXVSNsRtR+QG2A+K OReMdDQwIiio44SvqOUIMURmw/dI2BhuFSHcZabubL+4ei9Pe7M03aB1rQyWmqmuppJFFSHRdnTP1l e/n891r7+vuOBZEv+mRFyZkjE8tm47fmWE/mN7YS2CGIUEEw+vdHB1nqAwfUCBpR+Ru3JHPUjYQ79E FKwoAxryblPIhSRwI+SCe5MyDlBiUgw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ravnborg.org; s=ed1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=zHLVNT4Ib177dr3Dr0VkglUlA6GRR6rwSc8RKuf20vE=; b=m9xlOM3tF8rFO7Yh0b3YBT+kcTTk+KqPvZWhPjEBT4CMLTQmaFG7tDZs2dU2+9AViXPo3QGHoY8UZ w1MD83TAQ== X-HalOne-ID: 541fafe2-2212-11ee-9df5-99461c6a3fe8 Received: from ravnborg.org (2-105-2-98-cable.dk.customer.tdc.net [2.105.2.98]) by mailrelay1 (Halon) with ESMTPSA id 541fafe2-2212-11ee-9df5-99461c6a3fe8; Fri, 14 Jul 2023 06:47:42 +0000 (UTC) Date: Fri, 14 Jul 2023 08:47:41 +0200 From: Sam Ravnborg To: liubin001@208suo.com Cc: davem@davemloft.net, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] floppy:ERROR: missing put_device; call of_find_device_by_node on line 589, but without a corresponding object release within this function. Add the put_device function before return to release memory Message-ID: <20230714064741.GA53474@ravnborg.org> References: <0f4dc280605c4700556d88d6f59cd1c4@208suo.com> <20230714060655.GA50441@ravnborg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230714060655.GA50441@ravnborg.org> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi LiuBin. On Fri, Jul 14, 2023 at 08:06:55AM +0200, Sam Ravnborg wrote: > Hi LiuBin > > On Fri, Jul 14, 2023 at 12:56:29PM +0800, liubin001@208suo.com wrote: > > Signed-off-by: LiuBin > > --- > > arch/sparc/include/asm/floppy_64.h | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/arch/sparc/include/asm/floppy_64.h > > b/arch/sparc/include/asm/floppy_64.h > > index 070c8c1f5c8f..c4c51f494f25 100644 > > --- a/arch/sparc/include/asm/floppy_64.h > > +++ b/arch/sparc/include/asm/floppy_64.h > > @@ -588,6 +588,7 @@ static unsigned long __init sun_floppy_init(void) > > > > op = of_find_device_by_node(dp); > > if (!op) > > + put_device(op); > > return 0; > > This does not look right as the code will always return 0 now, > independent on the if test. You missed a set of curly braces. Two more notes. Please put the description of the fix in the body of the mail. Right now it is a very long subject - and we try to keep subject shorter than ~70 chars. > > Signed-off-by: LiuBin You are expected to sign-off the patch with you name and not a nickname. If LiuBin is indeed you name then sorry and ignore this comment. I look forward to the updated patch. Sam