Commit 153c36fc authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: Fix for valid nvram rtas tokens.

From: Olaf Hering <olh@suse.de>

Fix for valid nvram rtas tokens.
parent 9f53902c
...@@ -41,7 +41,8 @@ static ssize_t pSeries_nvram_read(char *buf, size_t count, loff_t *index) ...@@ -41,7 +41,8 @@ static ssize_t pSeries_nvram_read(char *buf, size_t count, loff_t *index)
unsigned long flags; unsigned long flags;
char *p = buf; char *p = buf;
if (nvram_size == 0 || nvram_fetch)
if (nvram_size == 0 || nvram_fetch == RTAS_UNKNOWN_SERVICE)
return -ENODEV; return -ENODEV;
if (*index >= nvram_size) if (*index >= nvram_size)
...@@ -83,7 +84,7 @@ static ssize_t pSeries_nvram_write(char *buf, size_t count, loff_t *index) ...@@ -83,7 +84,7 @@ static ssize_t pSeries_nvram_write(char *buf, size_t count, loff_t *index)
unsigned long flags; unsigned long flags;
const char *p = buf; const char *p = buf;
if (nvram_size == 0 || nvram_store) if (nvram_size == 0 || nvram_store == RTAS_UNKNOWN_SERVICE)
return -ENODEV; return -ENODEV;
if (*index >= nvram_size) if (*index >= nvram_size)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment