diff options
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r-- | drivers/pci/pci-driver.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index eb5b50c8770c..f22f69ac6445 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
@@ -53,11 +53,10 @@ store_new_id(struct device_driver *driver, const char *buf, size_t count) | |||
53 | if (fields < 0) | 53 | if (fields < 0) |
54 | return -EINVAL; | 54 | return -EINVAL; |
55 | 55 | ||
56 | dynid = kmalloc(sizeof(*dynid), GFP_KERNEL); | 56 | dynid = kzalloc(sizeof(*dynid), GFP_KERNEL); |
57 | if (!dynid) | 57 | if (!dynid) |
58 | return -ENOMEM; | 58 | return -ENOMEM; |
59 | 59 | ||
60 | memset(dynid, 0, sizeof(*dynid)); | ||
61 | INIT_LIST_HEAD(&dynid->node); | 60 | INIT_LIST_HEAD(&dynid->node); |
62 | dynid->id.vendor = vendor; | 61 | dynid->id.vendor = vendor; |
63 | dynid->id.device = device; | 62 | dynid->id.device = device; |