mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
sched/module: correct the check condition
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
484b930fd1
commit
38b3da6d00
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user