Subject: Re: [PATCH v15 1/1] mctp pcc: Implement MCTP over PCC Transport

From: Jakub Kicinski <[email-masked]>
Date: Mon, 20 Jan 2025 14:43:27 -0800

On Wed, 15 Jan 2025 14:52:17 -0500 [email-masked] 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