diff options
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r-- | drivers/pci/pci-driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 39e80fcef4b3..07fdb3cd6172 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
@@ -52,7 +52,7 @@ store_new_id(struct device_driver *driver, const char *buf, size_t count) | |||
52 | { | 52 | { |
53 | struct pci_dynid *dynid; | 53 | struct pci_dynid *dynid; |
54 | struct pci_driver *pdrv = to_pci_driver(driver); | 54 | struct pci_driver *pdrv = to_pci_driver(driver); |
55 | __u32 vendor=PCI_ANY_ID, device=PCI_ANY_ID, subvendor=PCI_ANY_ID, | 55 | __u32 vendor, device, subvendor=PCI_ANY_ID, |
56 | subdevice=PCI_ANY_ID, class=0, class_mask=0; | 56 | subdevice=PCI_ANY_ID, class=0, class_mask=0; |
57 | unsigned long driver_data=0; | 57 | unsigned long driver_data=0; |
58 | int fields=0; | 58 | int fields=0; |
@@ -61,7 +61,7 @@ store_new_id(struct device_driver *driver, const char *buf, size_t count) | |||
61 | fields = sscanf(buf, "%x %x %x %x %x %x %lux", | 61 | fields = sscanf(buf, "%x %x %x %x %x %x %lux", |
62 | &vendor, &device, &subvendor, &subdevice, | 62 | &vendor, &device, &subvendor, &subdevice, |
63 | &class, &class_mask, &driver_data); | 63 | &class, &class_mask, &driver_data); |
64 | if (fields < 0) | 64 | if (fields < 2) |
65 | return -EINVAL; | 65 | return -EINVAL; |
66 | 66 | ||
67 | dynid = kzalloc(sizeof(*dynid), GFP_KERNEL); | 67 | dynid = kzalloc(sizeof(*dynid), GFP_KERNEL); |