hv: assign: remove added ptirq entries if fails to add all
When adding ptirq entries, either successes with all number of entries added or fails with none entries addes. So remove added ptirq entries if error occurs during the process. Tracked-On: #861 Signed-off-by: Binbin Wu <binbin.wu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
d48dc38780
commit
d5865632ec
|
@ -755,6 +755,10 @@ int32_t ptirq_add_msix_remapping(struct acrn_vm *vm, uint16_t virt_bdf,
|
|||
vector_added++;
|
||||
}
|
||||
|
||||
if (vector_added != vector_count) {
|
||||
ptirq_remove_msix_remapping(vm, virt_bdf, vector_added);
|
||||
}
|
||||
|
||||
return (vector_added == vector_count) ? 0 : -ENODEV;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue