diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 1b89c3407251..ca0a1d5d2983 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -4587,7 +4587,8 @@ static int __init platform_optin_force_iommu(void) static int __init probe_acpi_namespace_devices(void) { struct dmar_drhd_unit *drhd; - struct intel_iommu *iommu; + /* To avoid a -Wunused-but-set-variable warning. */ + struct intel_iommu *iommu __maybe_unused; struct device *dev; int i, ret = 0;