提交 854d128b 编写于 作者: Y Yang Yingliang 提交者: Thierry Reding

soc/tegra: fuse: Don't return -ENOMEM when allocate lookups failed

fuse->base can not be unmapped if allocate lookups failed in
tegra_init_fuse(), because it is an early_initcall, the driver
will be loaded anyway and fuse->base will be accessed by other
functions later, so remove the return -ENOMEM after allocating
lookups failed to make less confusing.
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
[treding@nvidia.com: drop error message, out-of-memory is noisy anyway]
Signed-off-by: NThierry Reding <treding@nvidia.com>
上级 029f7e24
...@@ -489,10 +489,8 @@ static int __init tegra_init_fuse(void) ...@@ -489,10 +489,8 @@ static int __init tegra_init_fuse(void)
size_t size = sizeof(*fuse->lookups) * fuse->soc->num_lookups; size_t size = sizeof(*fuse->lookups) * fuse->soc->num_lookups;
fuse->lookups = kmemdup(fuse->soc->lookups, size, GFP_KERNEL); fuse->lookups = kmemdup(fuse->soc->lookups, size, GFP_KERNEL);
if (!fuse->lookups) if (fuse->lookups)
return -ENOMEM; nvmem_add_cell_lookups(fuse->lookups, fuse->soc->num_lookups);
nvmem_add_cell_lookups(fuse->lookups, fuse->soc->num_lookups);
} }
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册