usb: Use GRUB_USB_MAX_CONF macro instead of literal in hub for maximum configs
PATCH 1/1 usb: Use GRUB_USB_MAX_CONF macro instead of literal in hub for maximum configs
Signed-off-by Glenn Washburn <[email protected]>
--- grub-core/bus/usb/usbhub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
grub-core/bus/usb/usbhub.c +2 -2
@@ -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 ;
Signature · 1 line
2.27.0
Quoted 1 line · Glenn Washburn
Signed-off-by Glenn Washburn <[email protected]>
Reviewed-by Daniel Kiper <[email protected]>
Daniel