module: potential uninitialized return in module_kallsyms_on_each_symbol()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 10 Feb 2021 10:57:07 +0000 (13:57 +0300)
committerJessica Yu <jeyu@kernel.org>
Wed, 10 Feb 2021 15:57:04 +0000 (16:57 +0100)
commit1e80d9cb579ed7edd121753eeccce82ff82521b4
tree965ec6b2b7876dd172682b12be255c20dc092482
parent367948220fcefcad1bf0d3d595a06efe0694acae
module: potential uninitialized return in module_kallsyms_on_each_symbol()

Smatch complains that:

kernel/module.c:4472 module_kallsyms_on_each_symbol()
        error: uninitialized symbol 'ret'.

This warning looks like it could be correct if the &modules list is
empty.

Fixes: 013c1667cf78 ("kallsyms: refactor {,module_}kallsyms_on_each_symbol")
Reviewed-by: Miroslav Benes <mbenes@suse.cz>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
kernel/module.c