Jeremy Fitzhardinge
2007-Jun-06 15:34 UTC
[PATCH] paravirt: fix error handling in paravirt_disable_iospace
Make sure everything is backed out if it fails. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> --- arch/i386/kernel/paravirt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ==================================================================--- a/arch/i386/kernel/paravirt.c +++ b/arch/i386/kernel/paravirt.c @@ -254,8 +254,11 @@ int paravirt_disable_iospace(void) int ret; ret = request_resource(&ioport_resource, &reserve_ioports); - if (ret == 0) + if (ret == 0) { ret = request_resource(&iomem_resource, &reserve_iomem); + if (ret) + release_resource(&reserve_ioports); + } return ret; }
Maybe Matching Threads
- [PATCH] paravirt: helper to disable all IO space
- [PATCH 02/10] paravirt: remove unused function paravirt_disable_iospace()
- [PATCH 0/15] adjust pvops to accomodate its x86_64 variant
- [PATCH 0/15] adjust pvops to accomodate its x86_64 variant
- [PATCH 06/22] mm: factor out a devm_request_free_mem_region helper