sched/module: correct the check condition

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an
2022-03-19 00:42:30 +08:00
committed by Petro Karashchenko
parent 484b930fd1
commit 38b3da6d00
+2 -2
View File
@@ -192,9 +192,9 @@ FAR void *insmod(FAR const char *filename, FAR const char *modname)
/* Allocate a module registry entry to hold the module data */
modp = (FAR struct module_s *)kmm_zalloc(sizeof(struct module_s));
if (ret != 0)
if (modp == NULL)
{
binfo("Failed to initialize for load of ELF program: %d\n", ret);
berr("Failed to allocate struct module_s\n");
goto errout_with_loadinfo;
}