summaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-06-22 17:38:50 +0200
committerJessica Yu <jeyu@kernel.org>2018-06-25 10:37:08 +0200
commit62267e0ecc9c00a1b8ff7859cfa03e34b419f7ee (patch)
tree8a1311c254eeeb8d84a3c18e95aa2752af7e808c /kernel/module.c
parent5fdc7db6448a4f558f298b1c98d6d124fdf2ad95 (diff)
downloadlinux-62267e0ecc9c00a1b8ff7859cfa03e34b419f7ee.tar.bz2
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.c4
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: