diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2024-08-12 14:48:51 +0200 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2024-09-01 13:34:48 +0200 |
commit | 4c2598e3b62102d5ea7f618e13d996b069cde27d (patch) | |
tree | 36bea1b2d3c9904f2a00ff194ea3e460cd771dc6 /scripts/mod/symsearch.c | |
parent | kbuild: split x*alloc() functions in kconfig to scripts/include/xalloc.h (diff) | |
download | linux-4c2598e3b62102d5ea7f618e13d996b069cde27d.tar.xz linux-4c2598e3b62102d5ea7f618e13d996b069cde27d.zip |
modpost: replace the use of NOFAIL() with xmalloc() etc.
I think x*alloc() functions are cleaner.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/mod/symsearch.c')
-rw-r--r-- | scripts/mod/symsearch.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/mod/symsearch.c b/scripts/mod/symsearch.c index aa4ed51f9960..b9737b92f7f8 100644 --- a/scripts/mod/symsearch.c +++ b/scripts/mod/symsearch.c @@ -4,7 +4,7 @@ * Helper functions for finding the symbol in an ELF which is "nearest" * to a given address. */ - +#include <xalloc.h> #include "modpost.h" struct syminfo { @@ -125,8 +125,8 @@ void symsearch_init(struct elf_info *elf) { unsigned int table_size = symbol_count(elf); - elf->symsearch = NOFAIL(malloc(sizeof(struct symsearch) + - sizeof(struct syminfo) * table_size)); + elf->symsearch = xmalloc(sizeof(struct symsearch) + + sizeof(struct syminfo) * table_size); elf->symsearch->table_size = table_size; symsearch_populate(elf, elf->symsearch->table, table_size); |