aboutsummaryrefslogtreecommitdiff
path: root/sys/x86
diff options
context:
space:
mode:
authorKornel Duleba <mindal@semihalf.com>2021-10-21 12:46:51 +0000
committerWojciech Macek <wma@FreeBSD.org>2021-10-29 08:08:25 +0000
commit3c02da8096b142ef243da8da667c3a5a7d591105 (patch)
treef30d84723120f6a9d7379231de7c5630a419068a /sys/x86
parentccfa9ac5ac128fa59291fb99dcae27e890c58cbc (diff)
Diffstat (limited to 'sys/x86')
-rw-r--r--sys/x86/iommu/intel_ctx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/x86/iommu/intel_ctx.c b/sys/x86/iommu/intel_ctx.c
index 34730306000b..7aedbf159ac7 100644
--- a/sys/x86/iommu/intel_ctx.c
+++ b/sys/x86/iommu/intel_ctx.c
@@ -561,7 +561,7 @@ dmar_get_ctx_for_dev1(struct dmar_unit *dmar, device_t dev, uint16_t rid,
error = domain_init_rmrr(domain1, dev, bus,
slot, func, dev_domain, dev_busno, dev_path,
dev_path_len);
- if (error == 0)
+ if (error == 0 && dev != NULL)
error = dmar_reserve_pci_regions(domain1, dev);
if (error != 0) {
dmar_domain_destroy(domain1);