spl: nand: Fix NULL-pointer dereference
spl_nand_fit_read unconditionally accesses load->priv. Ensure it is set.
Fixes: 00e180cc513 ("spl: nand: support loading i.MX container format file")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index 07916be..5b6932b 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -105,7 +105,7 @@
struct spl_load_info load;
load.dev = NULL;
- load.priv = NULL;
+ load.priv = &offset;
load.filename = NULL;
load.bl_len = bl_len;
load.read = spl_nand_fit_read;