On Mon, Jul 13, 2026 at 09:30:43PM +0200, Rasmus Villemoes wrote:

> Considering that device_set_name() does
> 
>   int device_set_name(struct udevice *dev, const char *name)
>   {
>       name = strdup(name);
>       if (!name)
>               return -ENOMEM;
>       dev->name = name;
>       device_set_name_alloced(dev);
> 
>       return 0;
>   }
> 
> it should be pretty clear that these .bind methods are at best
> pointless (there's a fixup for device_set_name() en route that will
> make this not a memory leak).
> 
> I presume one of them got added by mistake and the remaining are
> cargo-culted, but regardless, just remove them to prevent yet more
> copies of this anti-pattern to appear.
> 
> Signed-off-by: Rasmus Villemoes <[email protected]>

Reviewed-by: Tom Rini <[email protected]>

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to