diff mbox

[RFC,2/2] core/flash: Force blocklevel to return only opal-api return codes

Message ID 20170125075653.9255-3-cyril.bur@au1.ibm.com
State RFC
Headers show

Commit Message

Cyril Bur Jan. 25, 2017, 7:56 a.m. UTC
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
---
 core/flash.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/core/flash.c b/core/flash.c
index 793401c9..4b8d7732 100644
--- a/core/flash.c
+++ b/core/flash.c
@@ -262,6 +262,9 @@  int flash_register(struct blocklevel_device *bl)
 	const char *name;
 	int rc;
 
+	/* Ensure we get sane error codes */
+	blocklevel_force_opal_codes(bl);
+
 	rc = blocklevel_get_info(bl, &name, &size, &block_size);
 	if (rc)
 		return rc;