summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/pci/pci.c6
-rw-r--r--sys/isa/isa_common.c6
-rw-r--r--sys/pccard/pccard_nbk.c6
-rw-r--r--sys/pci/pci.c6
4 files changed, 16 insertions, 8 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 8cb5943..4a36158 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/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;
}
diff --git a/sys/isa/isa_common.c b/sys/isa/isa_common.c
index 42d486e..9202754 100644
--- a/sys/isa/isa_common.c
+++ b/sys/isa/isa_common.c
@@ -869,8 +869,10 @@ isa_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;
}
diff --git a/sys/pccard/pccard_nbk.c b/sys/pccard/pccard_nbk.c
index 264b96e..b091363 100644
--- a/sys/pccard/pccard_nbk.c
+++ b/sys/pccard/pccard_nbk.c
@@ -178,8 +178,10 @@ pccard_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;
}
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