]> git.baikalelectronics.ru Git - kernel.git/commit
soc: fsl: guts: fix return value check in fsl_guts_init()
authorYang Yingliang <yangyingliang@huawei.com>
Tue, 28 Jun 2022 14:02:48 +0000 (22:02 +0800)
committerShawn Guo <shawnguo@kernel.org>
Tue, 5 Jul 2022 00:41:20 +0000 (08:41 +0800)
commitfeeb874d58a2c59cc243da4d7ef4b8dc50a23ae0
tree8cab5fe9decbcde2824d798ad576fdb8f7ddfd21
parent8a12bd918cb144c654bd7b50b1d5970aa2ff93d7
soc: fsl: guts: fix return value check in fsl_guts_init()

In case of error, of_iomap() returns NULL pointer not ERR_PTR().
The IS_ERR() test in the return value check should be replaced
with NULL test and return -ENOMEM as error value.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
drivers/soc/fsl/guts.c