Subject: Re: [PATCH RFC 2/7] net: Add helpers for netdev LEDs

From: Jakub Kicinski <[email-masked]>
Date: Thu, 21 Mar 2024 08:01:55 -0700

On Sun, 17 Mar 2024 16:45:15 -0500 Andrew Lunn wrote:
> +	struct device *dev = &ndev->dev;
> +	struct netdev_led *netdev_led;
> +	struct led_classdev *cdev;
> +	u32 index;
> +	int err;
> +
> +	netdev_led = devm_kzalloc(dev, sizeof(*netdev_led), GFP_KERNEL);
> +	if (!netdev_led)
> +		return -ENOMEM;

Are we guaranteed to have a real bus device under ndev->dev ?
I'm not aware of any use of devres in netdev core today.