[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250120144327.4960793b@kernel.org>
Date: Mon, 20 Jan 2025 14:43:27 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: admiyo@...amperecomputing.com
Cc: Jeremy Kerr <jk@...econstruct.com.au>, Matt Johnston
<matt@...econstruct.com.au>, Andrew Lunn <andrew+netdev@...n.ch>, "David S.
Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo
Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, Sudeep Holla <sudeep.holla@....com>, Jonathan
Cameron <Jonathan.Cameron@...wei.com>, Huisong Li <lihuisong@...wei.com>
Subject: Re: [PATCH v15 1/1] mctp pcc: Implement MCTP over PCC Transport
On Wed, 15 Jan 2025 14:52:17 -0500 admiyo@...amperecomputing.com wrote:
> + rc = devm_add_action_or_reset(dev, mctp_cleanup_netdev, ndev);
> + if (rc)
> + goto cleanup_netdev;
devm_add_action_or_reset() calls the cleanup handler on failure,
so just
return devm_add_action_or_reset(dev, mctp_cleanup_netdev, ndev);
directly. As is you'll double free the netdev on failure.
> + return rc;
> +cleanup_netdev:
> + free_netdev(ndev);
--
pw-bot: cr
Powered by blists - more mailing lists