[RFC PATCH 3/4] powerpc/powernv/nvram: opal_nvram_write handle unknown OPAL errors
Nicholas Piggin
npiggin at gmail.com
Fri Mar 16 21:02:11 AEDT 2018
opal_nvram_write currently just assumes success if it encounters an
error other than OPAL_BUSY or OPAL_BUSY_EVENT. Have it return -EIO
on other errors instead.
Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
arch/powerpc/platforms/powernv/opal-nvram.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/platforms/powernv/opal-nvram.c b/arch/powerpc/platforms/powernv/opal-nvram.c
index 9db4398ded5d..13bf625dc3e8 100644
--- a/arch/powerpc/platforms/powernv/opal-nvram.c
+++ b/arch/powerpc/platforms/powernv/opal-nvram.c
@@ -59,6 +59,8 @@ static ssize_t opal_nvram_write(char *buf, size_t count, loff_t *index)
if (rc == OPAL_BUSY_EVENT)
opal_poll_events(NULL);
}
+ if (rc)
+ return -EIO;
*index += count;
return count;
}
--
2.16.1
More information about the Linuxppc-dev
mailing list