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:
Glenn Washburn 2021-03-18 20:35:46 -05:00 committed by Daniel Kiper
parent 25d64bb273
commit c9c22dc803

View File

@ -82,7 +82,7 @@ grub_usb_hub_add_dev (grub_usb_controller_t controller,
if (i == GRUB_USBHUB_MAX_DEVICES)
{
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);
return NULL;
@ -96,7 +96,7 @@ grub_usb_hub_add_dev (grub_usb_controller_t controller,
i, 0, 0, NULL);
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);
return NULL;