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.
Unified · Split
| @@ -2284,9 +2284,9 @@ static int simplify_symbols(struct module *mod, const struct load_info *info) · 2283 unmodified lines | |||
| 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: |