mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
kernel/pci: fix unitialized memory
This commit is contained in:
parent
ad820a3618
commit
c818c242f3
1 changed files with 2 additions and 0 deletions
|
@ -325,6 +325,7 @@ int pci_get_driver(const struct pci_device *d, char *buf, size_t buflen)
|
|||
{
|
||||
int ret;
|
||||
char sysfs[1024], syml[1024];
|
||||
memset(syml, 0, sizeof(syml));
|
||||
|
||||
snprintf(sysfs, sizeof(sysfs), "%s/bus/pci/devices/%04x:%02x:%02x.%x/driver", SYSFS_PATH,
|
||||
d->slot.domain, d->slot.bus, d->slot.device, d->slot.function);
|
||||
|
@ -372,6 +373,7 @@ int pci_get_iommu_group(const struct pci_device *d)
|
|||
{
|
||||
int ret;
|
||||
char *group, link[1024], sysfs[1024];
|
||||
memset(link, 0, sizeof(link));
|
||||
|
||||
snprintf(sysfs, sizeof(sysfs), "%s/bus/pci/devices/%04x:%02x:%02x.%x/iommu_group", SYSFS_PATH,
|
||||
d->slot.domain, d->slot.bus, d->slot.device, d->slot.function);
|
||||
|
|
Loading…
Add table
Reference in a new issue