From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1A33037755C; Thu, 26 Mar 2026 16:57:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774544256; cv=none; b=iK6Gulff19yJZqkY5GxhJ+DK4qrMGM5myjOrZk8uaXRZ/sVuaa4kEZcOh53E+uu+3l43qxtniyDCWz0kZVTdzg9fEDDuWK/eanhwEKJc9axjaIs50eesIjbzvkfvBzqHciMvBD+ecDVsVrtW8tVNxur3rtYjy+EeZe5Fry4pCnU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774544256; c=relaxed/simple; bh=z5rFa6R8fXUGh3pBmIq7oP+HPfgBAdXXW+cCZfXMdhA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WpSoQmmeJEnO11fFft1QJBtln6TFKrdar3nXF5wRCuU+PfjdrnUhvG8lkq3UTz/y0fPDaFr+lbGrCEFPEOsUChPMWi3+BWbWuLdJmD5al48zEhjtdkB0dEda/bcvgL6qkm9TE9ZyBtkeOLFKAnC8vcpUAcqGtG1zMhTVChNtizk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=G2WMZZx/; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="G2WMZZx/" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=KmvK6l6GR25t9qXtIc4Zl0uKnAxLfL7ooqqIuDZI0MQ=; b=G2WMZZx/afVPnbXfQ2N8lyZ9YF BhZthNAwe9edPi2vZsUdwTXOZ1kFiGN58RPZ1wnKq3n2+5MrmN4hP/Qm9XaVn8vUa8MraTzIqyq4y 13f2TuJcCa3lN66QPs2lcFh5NOXFEQXkUn7RyCUAlTfaYHptxA2xDaJTMKf+yD0o7L7n8QrHM5qlv Bl67OWxt/qV9NAYAhlMXIabkxsH7bI+W55o8fX1u5p8I27zIOTvJ+PVlHMvfWlWMtwjrSmOccUmmn jBUFawXjTRFMR7ilCW4Xuq6I6fXLtc/qFI8qwJswWXbrh/bTByqCv65lp8PGbpwY5D7ty86bPS+7E bYoA+TUg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:55976) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w5o1T-0000000053X-25Pg; Thu, 26 Mar 2026 16:57:31 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.98.2) (envelope-from ) id 1w5o1Q-000000007CI-1WTp; Thu, 26 Mar 2026 16:57:28 +0000 Date: Thu, 26 Mar 2026 16:57:28 +0000 From: "Russell King (Oracle)" To: Jitendra Vegiraju Cc: netdev@vger.kernel.org, alexandre.torgue@foss.st.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com, bcm-kernel-feedback-list@broadcom.com, richardcochran@gmail.com, ast@kernel.org, daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com, rohan.g.thomas@altera.com, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, bpf@vger.kernel.org, andrew+netdev@lunn.ch, horms@kernel.org, sdf@fomichev.me, me@ziyao.cc, siyanteng@cqsoftware.com.cn, prabhakar.mahadev-lad.rj@bp.renesas.com, weishangjuan@eswincomputing.com, wens@kernel.org, vladimir.oltean@nxp.com, lizhi2@eswincomputing.com, boon.khai.ng@altera.com, maxime.chevallier@bootlin.com, chenchuangyu@xiaomi.com, yangtiezhu@loongson.cn, ovidiu.panait.rb@renesas.com, chenhuacai@kernel.org, florian.fainelli@broadcom.com, quic_abchauha@quicinc.com Subject: Re: [PATCH net-next v8 5/6] Fix error handling in probe function. Message-ID: References: <20260320211921.1202058-1-jitendra.vegiraju@broadcom.com> <20260320211921.1202058-6-jitendra.vegiraju@broadcom.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260320211921.1202058-6-jitendra.vegiraju@broadcom.com> Sender: Russell King (Oracle) On Fri, Mar 20, 2026 at 02:19:20PM -0700, Jitendra Vegiraju wrote: > From: Jitendra Vegiraju > > Software node created in probe function is not being cleaned up if > the probe function returns an error. > The stmmac core provides mechanism to handle this error condition > with plat->init, plat->exit helper functions. > Move glue driver's initialization code to plat->init function. > If the probe function returns an error, plat->exit function is > called. Handle any glue driver level cleanup in the plat->exit > handler. > Use devm_add_action_or_reset() to register a callback to free > irq vectors automatically, simplifying error handling in probe(). > > Suggested-by: Russell King (Oracle) > Signed-off-by: Jitendra Vegiraju Oh, you did fix it. Please merge this into patch 4, there is no need to have this fix seperate. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!