### Method

# FwupdPlugin UdevDevice find_usb_device

since: 1.8.7

#### Declaration [src]

    GUsbDevice*
    fu_udev_device_find_usb_device (
      FuUdevDevice* self
      GError** error
    )

#### Description [src]

Gets the matching `GUsbDevice` for the `GUdevDevice`.

NOTE: This should never be stored in the device class as an instance variable, as the lifecycle for `GUsbDevice` may be different to the `FuUdevDevice`. Every time the `GUsbDevice` is used this function should be called.

Available since: 1.8.7

#### Return value

Type: `GUsbDevice`

A `GUsbDevice`, or NULL if unset or invalid.

The caller of the method takes ownership of the data, and is responsible for freeing it.