Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 326074
b: refs/heads/master
c: ac08de3
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Sep 17, 2012
1 parent 6c962d1 commit 5705bd3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2bcb132c693566bcb8208cc7ce66b72a4f852ecf
refs/heads/master: ac08de32d2e2b2b56bfe85720ec9e0b06e75350a
11 changes: 3 additions & 8 deletions trunk/drivers/usb/core/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,9 @@ store_remove_id(struct device_driver *driver, const char *buf, size_t count)
{
struct usb_dynid *dynid, *n;
struct usb_driver *usb_driver = to_usb_driver(driver);
u32 idVendor = 0;
u32 idProduct = 0;
int fields = 0;
int retval = 0;
u32 idVendor;
u32 idProduct;
int fields;

fields = sscanf(buf, "%x %x", &idVendor, &idProduct);
if (fields < 2)
Expand All @@ -141,14 +140,10 @@ store_remove_id(struct device_driver *driver, const char *buf, size_t count)
(id->idProduct == idProduct)) {
list_del(&dynid->node);
kfree(dynid);
retval = 0;
break;
}
}
spin_unlock(&usb_driver->dynids.lock);

if (retval)
return retval;
return count;
}
static DRIVER_ATTR(remove_id, S_IRUGO | S_IWUSR, show_dynids, store_remove_id);
Expand Down

0 comments on commit 5705bd3

Please sign in to comment.