summaryrefslogtreecommitdiff
path: root/src/common_vgaarb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common_vgaarb.c')
-rw-r--r--src/common_vgaarb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common_vgaarb.c b/src/common_vgaarb.c
index a40b064..ca5c0a7 100644
--- a/src/common_vgaarb.c
+++ b/src/common_vgaarb.c
@@ -124,6 +124,10 @@ pci_device_vgaarb_init(void)
struct pci_slot_match match;
char buf[BUFSIZE];
int ret, rsrc;
+
+ if (!pci_sys)
+ return -1;
+
if ((pci_sys->vgaarb_fd = open ("/dev/vga_arbiter", O_RDWR)) < 0) {
return errno;
}