allow to call nffs_pkg_init() multiple times

This commit is contained in:
hathach committed 2017-01-17 15:29:08 +07:00
1 parent 42a4c9f821
commit 5f2f9cd52b
1 file changed
+5
+5
View File
@@ -755,10 +755,15 @@ nffs_init(void)
void
nffs_pkg_init(void)
{
static bool already_init = false;
struct nffs_area_desc descs[NFFS_AREA_MAX + 1];
int cnt;
int rc;
if (already_init) return;
already_init = true;
/* Ensure this function only gets called by sysinit. */
SYSINIT_ASSERT_ACTIVE();