From d682814e0ec511129cc1757de0b3ebabfa770590 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 18 Sep 2009 14:28:30 +1000 Subject: [PATCH] xfree86: don't clean up the arbiter if we never initialized Signed-off-by: Peter Hutterer --- hw/xfree86/common/xf86VGAarbiter.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/common/xf86VGAarbiter.c b/hw/xfree86/common/xf86VGAarbiter.c index 9b72331..f381c9c 100644 --- a/hw/xfree86/common/xf86VGAarbiter.c +++ b/hw/xfree86/common/xf86VGAarbiter.c @@ -76,19 +76,23 @@ static int VGAarbiterGCIndex; static DevPrivateKey VGAarbiterGCKey = &VGAarbiterGCIndex; static int vga_no_arb = 0; + +static int vga_arb_initialized = 0; + void xf86VGAarbiterInit(void) { if (pci_device_vgaarb_init() != 0) { vga_no_arb = 1; xf86Msg(X_WARNING, "VGA arbiter: cannot open kernel arbiter, no multi-card support\n"); - } + } else + vga_arb_initialized = 1; } void xf86VGAarbiterFini(void) { - if (vga_no_arb) + if (vga_no_arb || !vga_arb_initialized) return; pci_device_vgaarb_fini(); } -- 1.6.3.rc1.2.g0164.dirty