module: Fix NULL vs IS_ERR checking for module_get_next_page
authorMiaoqian Lin <linmq006@gmail.com>
Thu, 10 Nov 2022 02:58:34 +0000 (06:58 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:32:10 +0000 (13:32 +0100)
commit7a779e84b3c451ce4713456a413d3300143747a7
tree885315c1875de7870f61bc6aa19d6c323f931e82
parent0183b7c49cfdda91284505cbcdc7feecde48cbb9
module: Fix NULL vs IS_ERR checking for module_get_next_page

[ Upstream commit 45af1d7aae7d5520d2858f8517a1342646f015db ]

The module_get_next_page() function return error pointers on error
instead of NULL.
Use IS_ERR() to check the return value to fix this.

Fixes: b1ae6dc41eaa ("module: add in-kernel support for decompressing")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/module/decompress.c