All pastes #166991 Raw Edit

Miscellany

public text v1 · immutable
·published 2006-09-11 15:04 UTC
rendered paste body
--- drivers/char/i8k.c.orig     2006-09-11 17:00:38.000000000 +0200
+++ drivers/char/i8k.c  2006-09-11 17:00:01.000000000 +0200
@@ -162,6 +162,12 @@ static int i8k_get_fn_status(void)
        struct smm_regs regs = { .eax = I8K_SMM_FN_STATUS, };
        int rc;

+       /* Return 0 if problem reading bios to ensure that
+        * it doesn't return a wrong key.
+        */
+       if(i8k_get_bios_version() <= 0)
+               return 0;
+
        if ((rc = i8k_smm(&regs)) < 0)
                return rc;