From 535a2d97f2b9f131362cabd21436f11d827bebee Mon Sep 17 00:00:00 2001 From: shchmue Date: Fri, 25 Oct 2019 11:54:57 -0600 Subject: [PATCH] keys: Validate storage init --- source/keys/keys.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/keys/keys.c b/source/keys/keys.c index acc81fc..0a6ca1a 100644 --- a/source/keys/keys.c +++ b/source/keys/keys.c @@ -135,7 +135,10 @@ void dump_keys() { tsec_ctxt_t tsec_ctxt; sdmmc_t sdmmc; - emummc_storage_init_mmc(&storage, &sdmmc); + if (!emummc_storage_init_mmc(&storage, &sdmmc)) { + EPRINTF("Unable to init MMC."); + goto out_wait; + } TPRINTFARGS("%kMMC init... ", colors[(color_idx++) % 6]); // Read package1.