Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: airoha: Fix a NULL vs IS_ERR() bug in airoha_npu_run_firmware()

The devm_ioremap_resource() function returns error pointers. It never
returns NULL. Update the check to match.

Fixes: e27dba1951ce ("net: Use of_reserved_mem_region_to_resource{_byname}() for "memory-region"")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/fc6d194e-6bf5-49ca-bc77-3fdfda62c434@sabinyo.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Dan Carpenter and committed by
Jakub Kicinski
1e5e40f2 687678f1

+2 -2
+2 -2
drivers/net/ethernet/airoha/airoha_npu.c
··· 179 179 } 180 180 181 181 addr = devm_ioremap_resource(dev, res); 182 - if (!addr) { 183 - ret = -ENOMEM; 182 + if (IS_ERR(addr)) { 183 + ret = PTR_ERR(addr); 184 184 goto out; 185 185 } 186 186