summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-04-12 17:05:27 +0300
committerThierry Reding <treding@nvidia.com>2021-06-02 11:58:55 +0300
commit854d128b8c6c4fa47810ac7cf87c16b8085c3199 (patch)
tree8d3275346c51c4322adb7c02e6c906059d987f50 /drivers/soc
parent029f7e24a65df641ac843cda8dabe359ff0826eb (diff)
downloadlinux-854d128b8c6c4fa47810ac7cf87c16b8085c3199.tar.xz
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: Yang Yingliang <yangyingliang@huawei.com> [treding@nvidia.com: drop error message, out-of-memory is noisy anyway] Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/tegra/fuse/fuse-tegra.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/soc/tegra/fuse/fuse-tegra.c b/drivers/soc/tegra/fuse/fuse-tegra.c
index 94b60a692b51..3d9da3d359da 100644
--- a/drivers/soc/tegra/fuse/fuse-tegra.c
+++ b/drivers/soc/tegra/fuse/fuse-tegra.c
@@ -489,10 +489,8 @@ static int __init tegra_init_fuse(void)
size_t size = sizeof(*fuse->lookups) * fuse->soc->num_lookups;
fuse->lookups = kmemdup(fuse->soc->lookups, size, GFP_KERNEL);
- if (!fuse->lookups)
- return -ENOMEM;
-
- nvmem_add_cell_lookups(fuse->lookups, fuse->soc->num_lookups);
+ if (fuse->lookups)
+ nvmem_add_cell_lookups(fuse->lookups, fuse->soc->num_lookups);
}
return 0;