Here is a fix for chipset_enable.c when there is not /dev/cpu
Open fails so there is no reason to lseek in. Actually this is a trivial
fix for a bad return value from open.
Corresponding to flashrom svn r462.
Signed-off-by: Bertrand Jacquin <beber@meleeweb.net>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
diff --git a/chipset_enable.c b/chipset_enable.c
index 0395df6..84e19be 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -511,7 +511,7 @@
unsigned char buf[8];
fd_msr = open("/dev/cpu/0/msr", O_RDWR);
- if (!fd_msr) {
+ if (fd_msr == -1) {
perror("open msr");
return -1;
}