aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/access.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pci/access.c b/drivers/pci/access.c
index 381444794778..64dd7df90e62 100644
--- a/drivers/pci/access.c
+++ b/drivers/pci/access.c
@@ -356,7 +356,8 @@ int pci_vpd_truncate(struct pci_dev *dev, size_t size)
356 return -EINVAL; 356 return -EINVAL;
357 357
358 dev->vpd->len = size; 358 dev->vpd->len = size;
359 dev->vpd->attr->size = size; 359 if (dev->vpd->attr)
360 dev->vpd->attr->size = size;
360 361
361 return 0; 362 return 0;
362} 363}