summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2009-05-05 21:08:36 +0000
committerMyles Watson <mylesgw@gmail.com>2009-05-05 21:08:36 +0000
commitb452a913d67c131c3a3ec6e29623d0ca4c14df82 (patch)
tree579aa16c4af0e60f44ce4e3e3a8db335533624b1
parente612a11ab700d22db52aead765da166fd914f18b (diff)
downloadast2050-flashrom-b452a913d67c131c3a3ec6e29623d0ca4c14df82.zip
ast2050-flashrom-b452a913d67c131c3a3ec6e29623d0ca4c14df82.tar.gz
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>
-rw-r--r--chipset_enable.c2
1 files changed, 1 insertions, 1 deletions
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 @@ static int enable_flash_cs5536(struct pci_dev *dev, const char *name)
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;
}
OpenPOWER on IntegriCloud