hv: vtd: fix use of uninitialized variable in dmar_free_irte
This patch fixes the following error: error: variable 'sid' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized] Tracked-On: #861 Signed-off-by: Gao, Shiqing <shiqing.gao@intel.com>
This commit is contained in:
parent
2aed0c7aa1
commit
0bcf469758
|
@ -1398,6 +1398,7 @@ void dmar_free_irte(const struct intr_source *intr_src, uint16_t index)
|
|||
|
||||
if (intr_src->is_msi) {
|
||||
dmar_unit = device_to_dmaru((uint8_t)intr_src->src.msi.bits.b, intr_src->src.msi.fields.devfun);
|
||||
sid.value = (uint16_t)(intr_src->src.msi.value);
|
||||
} else {
|
||||
dmar_unit = ioapic_to_dmaru(intr_src->src.ioapic_id, &sid);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue