From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 391B220E702 for ; Sat, 21 Mar 2026 13:09:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774098577; cv=none; b=lw+xXW6eBAe/YoNba03PrqTHTwGThdnafTJDk7Jzl4sAVI6XuwHtvU7KoyvGkth35f6dUw9/uOaG5jSyjuGHzyYbegS+4uNJCV9jV694t4ZM/UJUNkFJCfzbBpehgCWvosbLUCXGLAYZvT65KWobXvlT1qW6TbN9Hdm7ltfEmzI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774098577; c=relaxed/simple; bh=dTmt0CpKQWFrPI2bQR7wWvu2/uBaYz30e6vvB7xr+D4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=d72GfC+FxFu1sMc8QdNEvwr37cdIL1oU59yP5DmQEqDYBg+JsOLpdTrGXTObaOeu9NO64WXehVgQJftDw1DTLYuv+YtFcnVSYRjonKIeW78/0lcAcnNhe54vsGHK6YbJekYBHcXi5yzKyF57bHTpyfmQpR95UG0Sgwe1M9P/D/Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NK1XDnNX; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NK1XDnNX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54F69C19421; Sat, 21 Mar 2026 13:09:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774098576; bh=dTmt0CpKQWFrPI2bQR7wWvu2/uBaYz30e6vvB7xr+D4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NK1XDnNX7jKHvW9R9uT9CawmULfhovJZTIsIzwrqu89k7RbHmtbLxRgVlsnfjBbLm 5sbcnMcJ6Ju6k2OgkqJ5TW6KaxRp3IbBgbIKDdod92fGhFfDJX3z9SDKwKgsHWbA8T ty5z2wQy6LzmhDipnAo9DkNwFzsZwXFNsvLoV2XpZZtFybY3ZwbsEINecHQ5pB2qju 2FjoZ6TVBuRsdOYXGn4hpU3jfdlC410nH9+P5o9/Q4Eh3aXM7OGI33RNEZ6HEfGsGl FJVrEwj2lrrgh7FWe7QrqkefL2+xyZQc32SQw3Ad1OSX1DxItD7KC63/gVFq8aBDmN y/T1WPiT2KgZw== Date: Sat, 21 Mar 2026 14:09:34 +0100 From: Lorenzo Bianconi To: Simon Horman Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, netdev@vger.kernel.org Subject: Re: [PATCH net-next] net: airoha: Rework the code flow in airoha_remove() and in airoha_probe() error path Message-ID: References: <20260320-airoha-remove-rework-v1-1-adeef7e3c01f@kernel.org> <20260321094429.GW74886@horms.kernel.org> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="EZz7n3wwzIYEdEN2" Content-Disposition: inline In-Reply-To: <20260321094429.GW74886@horms.kernel.org> --EZz7n3wwzIYEdEN2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mar 21, Simon Horman wrote: > On Fri, Mar 20, 2026 at 09:42:28AM +0100, Lorenzo Bianconi wrote: > > As suggested by Simon in [0], rework the code flow in airoha_remove() > > and in the airoha_probe() error path in order to rely on a more common > > approach un-registering configured net-devices first and destroying the > > hw resources at the end of the code. > > Introduce airoha_qdma_cleanup routine to release QDMA resources. > >=20 > > [0] https://lore.kernel.org/netdev/20251214-airoha-fix-dev-registration= -v1-1-860e027ad4c6@kernel.org/ > >=20 > > Suggested-by: Simon Horman > > Signed-off-by: Lorenzo Bianconi > > --- > > drivers/net/ethernet/airoha/airoha_eth.c | 82 ++++++++++++++++++------= -------- > > 1 file changed, 47 insertions(+), 35 deletions(-) > >=20 > > diff --git a/drivers/net/ethernet/airoha/airoha_eth.c b/drivers/net/eth= ernet/airoha/airoha_eth.c >=20 > ... >=20 > > @@ -3028,7 +3044,7 @@ static int airoha_probe(struct platform_device *p= dev) > > =20 > > err =3D airoha_hw_init(pdev, eth); > > if (err) > > - goto error_hw_cleanup; > > + return err; >=20 > Hi Lorenzo, >=20 > AI generated review warns that eth->napi_dev is leaked here. > And that does seem to be the case. Hi Simon, right. I will fix it in v2. Regards, Lorenzo >=20 > > =20 > > for (i =3D 0; i < ARRAY_SIZE(eth->qdma); i++) > > airoha_qdma_start_napi(ð->qdma[i]); >=20 > ... --EZz7n3wwzIYEdEN2 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCab6YjgAKCRA6cBh0uS2t rNf6AP9KP6eC4+MHzMb7WFbxq92nj5wfHEpgj5oEBa1ehx8vawEAiqgEov1K4lLS 0i3wDxbABgh92m891ZGxsVx+2UzXcgU= =SzaX -----END PGP SIGNATURE----- --EZz7n3wwzIYEdEN2--