Re: [PATCH v13 1/1] mctp pcc: Implement MCTP over PCC Transport
From: Jakub Kicinski
Date: Fri Jan 10 2025 - 20:50:36 EST
On Tue, 7 Jan 2025 12:27:33 -0500 admiyo@xxxxxxxxxxxxxxxxxxxxxx wrote:
> + //inbox initialization
> + snprintf(name, sizeof(name), "mctpipcc%d", context.inbox_index);
> + ndev = alloc_netdev(sizeof(struct mctp_pcc_ndev), name, NET_NAME_ENUM,
> + mctp_pcc_setup);
> + if (!ndev)
> + return -ENOMEM;
> +
> + mctp_pcc_ndev = netdev_priv(ndev);
> + rc = devm_add_action_or_reset(dev, mctp_cleanup_netdev, ndev);
> + if (rc)
> + goto cleanup_netdev;
I think this needs to move down, AFAICT mctp_cleanup_netdev calls
unregister and unregistering a netdev which was never successfully
registered is not supported.
--
pw-bot: cr