diff mbox

core/flash: Don't clobber rc in error path

Message ID 1424670008-9698-1-git-send-email-joel@jms.id.au
State Accepted
Headers show

Commit Message

Joel Stanley Feb. 23, 2015, 5:40 a.m. UTC
When checking paramters for errors we set rc, but then simply return
OPAL_HARDWARE in the error path.

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

Patch

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,