Skip to content

Commit

Permalink
* grub-core/bus/usb/ehci.c (grub_ehci_restore_hw): Return right enum …
Browse files Browse the repository at this point in the history
…type. (grub_ehci_fini_hw): Likewise. * grub-core/bus/usb/usbhub.c (grub_usb_add_hub): Likewise.
  • Loading branch information
phcoder authored and ani-sinha committed Jul 4, 2022
1 parent d0386e6 commit 0cc0d7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions grub-core/bus/usb/ehci.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <grub/time.h>
#include <grub/loader.h>
#include <grub/cs5536.h>
#include <grub/err.h>

GRUB_MOD_LICENSE ("GPLv3+");

Expand Down Expand Up @@ -1259,7 +1260,7 @@ grub_ehci_setup_transfer (grub_usb_controller_t dev,
if ((transfer->dev->speed != GRUB_USB_SPEED_HIGH)
&& !transfer->dev->hubaddr)
{
grub_error (GRUB_USB_ERR_BADDEVICE,
grub_error (GRUB_ERR_BAD_DEVICE,
"FULL/LOW speed device on EHCI port!?!");
return GRUB_USB_ERR_BADDEVICE;
}
Expand Down Expand Up @@ -1719,7 +1720,7 @@ grub_ehci_portstatus (grub_usb_controller_t dev,
/* FULL speed device connected - change port ownership.
* It results in disconnected state of this EHCI port. */
grub_ehci_port_setbits (e, port, GRUB_EHCI_PORT_OWNER);
return GRUB_USB_ERR_BADDEVICE;
return GRUB_ERR_BAD_DEVICE;
}

/* XXX: Fix it! There is possible problem - we can say to calling
Expand Down Expand Up @@ -1866,7 +1867,7 @@ grub_ehci_restore_hw (void)
}
}

return GRUB_USB_ERR_NONE;
return GRUB_ERR_NONE;
}

static grub_err_t
Expand All @@ -1886,7 +1887,7 @@ grub_ehci_fini_hw (int noreturn __attribute__ ((unused)))
grub_error (GRUB_ERR_TIMEOUT, "restore_hw: EHCI reset timeout");
}

return GRUB_USB_ERR_NONE;
return GRUB_ERR_NONE;
}

static struct grub_usb_controller_dev usb_controller = {
Expand Down
2 changes: 1 addition & 1 deletion grub-core/bus/usb/usbhub.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ grub_usb_add_hub (grub_usb_device_t dev)

rescan = 1;

return GRUB_ERR_NONE;
return GRUB_USB_ERR_NONE;
}

static void
Expand Down

0 comments on commit 0cc0d7a

Please sign in to comment.