summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/i830_lvds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index b1bf6eee..c6002ebd 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -422,7 +422,6 @@ i830_lvds_acpi_lid_open(xf86OutputPtr output)
}
if (strcmp(lid_dent->d_name, ".") &&
strcmp(lid_dent->d_name, "..")) {
- closedir(lid_dir);
break;
}
}
@@ -432,6 +431,8 @@ i830_lvds_acpi_lid_open(xf86OutputPtr output)
strcat(state_name, lid_dent->d_name);
strcat(state_name, "/state");
+ closedir(lid_dir);
+
if ((fd = open(state_name, O_RDONLY)) == -1) {
free(state_name);
goto out;