Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127350
b: refs/heads/master
c: 2debb4d
h: refs/heads/master
v: v3
  • Loading branch information
Chris Wright authored and Jesse Barnes committed Jan 7, 2009
1 parent b46d8fc commit e85cc49
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 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: 56ee325e25a0f76fc3267872867b3d70af179aad
refs/heads/master: 2debb4d2019fa05a0896f1591dea0e0dc21bc046
20 changes: 11 additions & 9 deletions trunk/drivers/pci/pci-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ store_new_id(struct device_driver *driver, const char *buf, size_t count)
subdevice=PCI_ANY_ID, class=0, class_mask=0;
unsigned long driver_data=0;
int fields=0;
int retval;
int retval=0;

fields = sscanf(buf, "%x %x %x %x %x %x %lx",
&vendor, &device, &subvendor, &subdevice,
Expand All @@ -58,16 +58,18 @@ store_new_id(struct device_driver *driver, const char *buf, size_t count)

/* Only accept driver_data values that match an existing id_table
entry */
retval = -EINVAL;
while (ids->vendor || ids->subvendor || ids->class_mask) {
if (driver_data == ids->driver_data) {
retval = 0;
break;
if (ids) {
retval = -EINVAL;
while (ids->vendor || ids->subvendor || ids->class_mask) {
if (driver_data == ids->driver_data) {
retval = 0;
break;
}
ids++;
}
ids++;
if (retval) /* No match */
return retval;
}
if (retval) /* No match */
return retval;

dynid = kzalloc(sizeof(*dynid), GFP_KERNEL);
if (!dynid)
Expand Down

0 comments on commit e85cc49

Please sign in to comment.