]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod-module: Fix return code for kmod_module_new_from_lookup()
authorLucas De Marchi <lucas.demarchi@intel.com>
Tue, 15 Feb 2022 22:09:14 +0000 (14:09 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 21 Feb 2022 04:58:11 +0000 (20:58 -0800)
commitec8818bcfb903c8f6a614a5aa4d1aa231d79308c
treed503153610caee641ab3e15491de357f9ef6404c
parent9dc4e5ccd4d7ff9ed4e96db8446501a3dc862dbf
libkmod-module: Fix return code for kmod_module_new_from_lookup()

When kmod_module_new_from_lookup() resolves to an alias, `err` will be
set to a positive value from the lookup function. Do not return a
positive value to follow the behavior when it matches a module name
and the documentation.

Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
libkmod/libkmod-module.c