mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 21:51:40 +00:00
nvmem: sprd: Fix return value of sprd_efuse_probe()
When call function devm_platform_ioremap_resource(), we should use IS_ERR()
to check the return value and return PTR_ERR() if failed.
Fixes: 096030e7f4
("nvmem: sprd: Add Spreadtrum SoCs eFuse support")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200722100705.7772-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7e84522cd0
commit
bcd14bb7a6
@ -378,8 +378,8 @@ static int sprd_efuse_probe(struct platform_device *pdev)
|
||||
return -ENOMEM;
|
||||
|
||||
efuse->base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (!efuse->base)
|
||||
return -ENOMEM;
|
||||
if (IS_ERR(efuse->base))
|
||||
return PTR_ERR(efuse->base);
|
||||
|
||||
ret = of_hwspin_lock_get_id(np, 0);
|
||||
if (ret < 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user