summaryrefslogtreecommitdiffstats
path: root/sys/pci/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/pci/pci.c')
-rw-r--r--sys/pci/pci.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/pci/pci.c b/sys/pci/pci.c
index 8cb5943..4a36158 100644
--- a/sys/pci/pci.c
+++ b/sys/pci/pci.c
@@ -1333,8 +1333,10 @@ pci_get_resource(device_t dev, device_t child, int type, int rid,
if (!rle)
return ENOENT;
- *startp = rle->start;
- *countp = rle->count;
+ if (startp)
+ *startp = rle->start;
+ if (countp)
+ *countp = rle->count;
return 0;
}
OpenPOWER on IntegriCloud