diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-06-22 17:38:50 +0200 |
---|---|---|
committer | Jessica Yu <jeyu@kernel.org> | 2018-06-25 10:37:08 +0200 |
commit | 62267e0ecc9c00a1b8ff7859cfa03e34b419f7ee (patch) | |
tree | 8a1311c254eeeb8d84a3c18e95aa2752af7e808c /kernel/module.c | |
parent | module: setup load info before module_sig_check() (diff) | |
download | linux-62267e0ecc9c00a1b8ff7859cfa03e34b419f7ee.tar.xz linux-62267e0ecc9c00a1b8ff7859cfa03e34b419f7ee.zip |
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/module.c')
-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) if (!ksym && ELF_ST_BIND(sym[i].st_info) == STB_WEAK) break; - pr_warn("%s: Unknown symbol %s (err %li)\n", - mod->name, name, PTR_ERR(ksym)); ret = PTR_ERR(ksym) ?: -ENOENT; + pr_warn("%s: Unknown symbol %s (err %d)\n", + mod->name, name, ret); break; default: |