diff options
Diffstat (limited to 'drivers/pci/pci-sysfs.c')
-rw-r--r-- | drivers/pci/pci-sysfs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 965a5934623a..56ac2bc003c7 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -501,9 +501,8 @@ int pci_create_sysfs_dev_files (struct pci_dev *pdev) | |||
501 | if (pci_resource_len(pdev, PCI_ROM_RESOURCE)) { | 501 | if (pci_resource_len(pdev, PCI_ROM_RESOURCE)) { |
502 | struct bin_attribute *rom_attr; | 502 | struct bin_attribute *rom_attr; |
503 | 503 | ||
504 | rom_attr = kmalloc(sizeof(*rom_attr), GFP_ATOMIC); | 504 | rom_attr = kzalloc(sizeof(*rom_attr), GFP_ATOMIC); |
505 | if (rom_attr) { | 505 | if (rom_attr) { |
506 | memset(rom_attr, 0x00, sizeof(*rom_attr)); | ||
507 | pdev->rom_attr = rom_attr; | 506 | pdev->rom_attr = rom_attr; |
508 | rom_attr->size = pci_resource_len(pdev, PCI_ROM_RESOURCE); | 507 | rom_attr->size = pci_resource_len(pdev, PCI_ROM_RESOURCE); |
509 | rom_attr->attr.name = "rom"; | 508 | rom_attr->attr.name = "rom"; |