mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 15:37:23 +00:00
dm: usb: Mark the device name as alloced when binding
Since usb_find_and_bind_driver() allocates the device name it should tell driver about that, to avoid memory leaks. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
c7b63d500d
commit
ecdf3ab01f
1 changed files with 2 additions and 0 deletions
|
@ -563,6 +563,8 @@ static int usb_find_and_bind_driver(struct udevice *parent,
|
|||
if (!str)
|
||||
return -ENOMEM;
|
||||
ret = device_bind_driver(parent, "usb_dev_generic_drv", str, devp);
|
||||
if (!ret)
|
||||
device_set_name_alloced(*devp);
|
||||
|
||||
error:
|
||||
debug("%s: No match found: %d\n", __func__, ret);
|
||||
|
|
Loading…
Reference in a new issue