mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-01-22 06:32:59 +00:00
ledtrig-usbdev: fix duplicate match detection
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
f1e085adfe
commit
8fb89f7e73
@ -92,13 +92,14 @@ static int usbdev_trig_find_usb_dev(struct usb_device *usb_dev, void *data)
|
|||||||
{
|
{
|
||||||
struct usbdev_trig_match *match = data;
|
struct usbdev_trig_match *match = data;
|
||||||
|
|
||||||
|
if (strcmp(dev_name(&usb_dev->dev), match->device_name) != 0)
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (WARN_ON(match->usb_dev))
|
if (WARN_ON(match->usb_dev))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!strcmp(dev_name(&usb_dev->dev), match->device_name)) {
|
dev_dbg(&usb_dev->dev, "matched this device!\n");
|
||||||
dev_dbg(&usb_dev->dev, "matched this device!\n");
|
match->usb_dev = usb_get_dev(usb_dev);
|
||||||
match->usb_dev = usb_get_dev(usb_dev);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user