| .. | .. |
|---|
| 1 | 1 | // SPDX-License-Identifier: GPL-2.0 |
|---|
| 2 | 2 | #include <linux/compiler.h> |
|---|
| 3 | +#include <linux/zalloc.h> |
|---|
| 3 | 4 | #include <sys/types.h> |
|---|
| 4 | 5 | #include <regex.h> |
|---|
| 6 | +#include <stdlib.h> |
|---|
| 5 | 7 | |
|---|
| 6 | 8 | struct arm_annotate { |
|---|
| 7 | 9 | regex_t call_insn, |
|---|
| .. | .. |
|---|
| 35 | 37 | |
|---|
| 36 | 38 | arm = zalloc(sizeof(*arm)); |
|---|
| 37 | 39 | if (!arm) |
|---|
| 38 | | - return -1; |
|---|
| 40 | + return ENOMEM; |
|---|
| 39 | 41 | |
|---|
| 40 | 42 | #define ARM_CONDS "(cc|cs|eq|ge|gt|hi|le|ls|lt|mi|ne|pl|vc|vs)" |
|---|
| 41 | 43 | err = regcomp(&arm->call_insn, "^blx?" ARM_CONDS "?$", REG_EXTENDED); |
|---|
| .. | .. |
|---|
| 57 | 59 | regfree(&arm->call_insn); |
|---|
| 58 | 60 | out_free_arm: |
|---|
| 59 | 61 | free(arm); |
|---|
| 60 | | - return -1; |
|---|
| 62 | + return SYMBOL_ANNOTATE_ERRNO__ARCH_INIT_REGEXP; |
|---|
| 61 | 63 | } |
|---|