Commit 62267e0e authored by Jason A. Donenfeld's avatar Jason A. Donenfeld Committed by Jessica Yu
Browse files

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: default avatarJason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: default avatarJessica Yu <jeyu@kernel.org>
parent 5fdc7db6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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: