mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-27 08:01:37 +00:00
usb/usbhub: Use GRUB_USB_MAX_CONF macro instead of literal in hub for maximum configs
Signed-off-by: Glenn Washburn <development@efficientek.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
25d64bb273
commit
c9c22dc803
@ -82,7 +82,7 @@ grub_usb_hub_add_dev (grub_usb_controller_t controller,
|
|||||||
if (i == GRUB_USBHUB_MAX_DEVICES)
|
if (i == GRUB_USBHUB_MAX_DEVICES)
|
||||||
{
|
{
|
||||||
grub_error (GRUB_ERR_IO, "can't assign address to USB device");
|
grub_error (GRUB_ERR_IO, "can't assign address to USB device");
|
||||||
for (i = 0; i < 8; i++)
|
for (i = 0; i < GRUB_USB_MAX_CONF; i++)
|
||||||
grub_free (dev->config[i].descconf);
|
grub_free (dev->config[i].descconf);
|
||||||
grub_free (dev);
|
grub_free (dev);
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -96,7 +96,7 @@ grub_usb_hub_add_dev (grub_usb_controller_t controller,
|
|||||||
i, 0, 0, NULL);
|
i, 0, 0, NULL);
|
||||||
if (err)
|
if (err)
|
||||||
{
|
{
|
||||||
for (i = 0; i < 8; i++)
|
for (i = 0; i < GRUB_USB_MAX_CONF; i++)
|
||||||
grub_free (dev->config[i].descconf);
|
grub_free (dev->config[i].descconf);
|
||||||
grub_free (dev);
|
grub_free (dev);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user