All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glenn Washburn <development@efficientek.com>
To: grub-devel@gnu.org, Daniel Kiper <daniel.kiper@oracle.com>
Cc: Glenn Washburn <development@efficientek.com>
Subject: [PATCH] usb: Use GRUB_USB_MAX_CONF macro instead of literal in hub for maximum configs
Date: Thu, 18 Mar 2021 20:35:46 -0500	[thread overview]
Message-ID: <20210319013546.1397001-1-development@efficientek.com> (raw)

Signed-off-by: Glenn Washburn <development@efficientek.com>
---
 grub-core/bus/usb/usbhub.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/grub-core/bus/usb/usbhub.c b/grub-core/bus/usb/usbhub.c
index a06cce302..85ccf3a4b 100644
--- a/grub-core/bus/usb/usbhub.c
+++ b/grub-core/bus/usb/usbhub.c
@@ -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;
-- 
2.27.0



             reply	other threads:[~2021-03-19  1:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-19  1:35 Glenn Washburn [this message]
2021-03-23 17:38 ` [PATCH] usb: Use GRUB_USB_MAX_CONF macro instead of literal in hub for maximum configs Daniel Kiper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210319013546.1397001-1-development@efficientek.com \
    --to=development@efficientek.com \
    --cc=daniel.kiper@oracle.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.