[Nouveau] [PATCH 1/3] drm/nouveau: Initialize has_optimus
Andreas Heider
andreas at meetr.de
Fri Mar 23 14:57:05 PDT 2012
During dsm detection it is possible that has_optimus is read uninitialized,
which can lead to optimus being detected erroneously. This patch
initialized has_optimus with 0.
Signed-off-by: Andreas Heider <andreas at meetr.de>
---
drivers/gpu/drm/nouveau/nouveau_acpi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c
index 7814a76..284bd25 100644
--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
+++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
@@ -270,7 +270,7 @@ static bool nouveau_dsm_detect(void)
struct acpi_buffer buffer = {sizeof(acpi_method_name), acpi_method_name};
struct pci_dev *pdev = NULL;
int has_dsm = 0;
- int has_optimus;
+ int has_optimus = 0;
int vga_count = 0;
bool guid_valid;
int retval;
--
1.7.9.1
More information about the Nouveau
mailing list