diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-06-22 11:38:50 -0400 |
---|---|---|
committer | Jessica Yu <jeyu@kernel.org> | 2018-06-25 04:37:08 -0400 |
commit | 62267e0ecc9c00a1b8ff7859cfa03e34b419f7ee (patch) | |
tree | 8a1311c254eeeb8d84a3c18e95aa2752af7e808c /kernel | |
parent | 5fdc7db6448a4f558f298b1c98d6d124fdf2ad95 (diff) |
module: print sensible error code
Printing "err 0" to the user in the warning message is not particularly
useful, especially when this gets transformed into a -ENOENT for the
remainder of the call chain.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/module.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/module.c b/kernel/module.c index 0ad0bb58e116..b6b3a3c58af1 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -2284,9 +2284,9 @@ static int simplify_symbols(struct module *mod, const struct load_info *info) | |||
2284 | if (!ksym && ELF_ST_BIND(sym[i].st_info) == STB_WEAK) | 2284 | if (!ksym && ELF_ST_BIND(sym[i].st_info) == STB_WEAK) |
2285 | break; | 2285 | break; |
2286 | 2286 | ||
2287 | pr_warn("%s: Unknown symbol %s (err %li)\n", | ||
2288 | mod->name, name, PTR_ERR(ksym)); | ||
2289 | ret = PTR_ERR(ksym) ?: -ENOENT; | 2287 | ret = PTR_ERR(ksym) ?: -ENOENT; |
2288 | pr_warn("%s: Unknown symbol %s (err %d)\n", | ||
2289 | mod->name, name, ret); | ||
2290 | break; | 2290 | break; |
2291 | 2291 | ||
2292 | default: | 2292 | default: |