Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions kernel/module/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2613,9 +2613,8 @@ static int find_module_sections(struct module *mod, struct load_info *info)

static int move_module(struct module *mod, struct load_info *info)
{
int i;
enum mod_mem_type t = 0;
int ret = -ENOMEM;
int i, ret;
enum mod_mem_type t = MOD_MEM_NUM_TYPES;
bool codetag_section_found = false;

for_each_mod_mem_type(type) {
Expand Down Expand Up @@ -2693,7 +2692,7 @@ static int move_module(struct module *mod, struct load_info *info)
return 0;
out_err:
module_memory_restore_rox(mod);
for (t--; t >= 0; t--)
while (t--)
module_memory_free(mod, t);
if (codetag_section_found)
codetag_free_module_sections(mod);
Expand Down
Loading