mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
sched/module: correct the check condition
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
484b930fd1
commit
38b3da6d00
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue