[Skiboot] [PATCH] core/flash: Don't clobber rc in error path

Joel Stanley joel at jms.id.au
Mon Feb 23 16:40:08 AEDT 2015


When checking paramters for errors we set rc, but then simply return
OPAL_HARDWARE in the error path.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 core/flash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/flash.c b/core/flash.c
index 6fe9250..16a2762 100644
--- a/core/flash.c
+++ b/core/flash.c
@@ -301,7 +301,7 @@ static int64_t opal_flash_op(enum flash_op op, uint64_t id, uint64_t offset,
 
 err:
 	unlock(&flash_lock);
-	return OPAL_HARDWARE;
+	return rc;
 }
 
 static int64_t opal_flash_read(uint64_t id, uint64_t offset, uint64_t buf,
-- 
2.1.4



More information about the Skiboot mailing list