---
name: "usb_hcd_check_unlink_urb"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/usb_hcd_check_unlink_urb"
---

# usb\_hcd\_check\_unlink\_urb(9)

check whether an URB may be unlinked

## NAME

usb\_hcd\_check\_unlink\_urb - check whether an URB may be unlinked

## SYNOPSIS

**int usb\_hcd\_check\_unlink\_urb(struct usb\_hcd \*** *hcd***, struct urb \*** *urb***, int** *status***);**

## ARGUMENTS

*hcd*

host controller to which *urb* was submitted

*urb*

URB being checked for unlinkability

*status*

error code to store in *urb* if the unlink succeeds

## DESCRIPTION

Host controller drivers should call this routine in their **dequeue** method. The HCD's private spinlock must be held and interrupts must be disabled. The actions carried out here are required for making sure than an unlink is valid.

## RETURN

0 for no error, otherwise a negative error code (in which case the **dequeue** method must fail). The possible error codes are:

\-EIDRM: *urb* was not submitted or has already completed. The completion function may not have been called yet.

\-EBUSY: *urb* has already been unlinked.

## COPYRIGHT
