diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-04-12 16:05:27 +0200 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2021-06-02 10:58:55 +0200 |
commit | 854d128b8c6c4fa47810ac7cf87c16b8085c3199 (patch) | |
tree | 8d3275346c51c4322adb7c02e6c906059d987f50 /drivers/soc/tegra | |
parent | soc/tegra: regulators: Support core domain state syncing (diff) | |
download | linux-854d128b8c6c4fa47810ac7cf87c16b8085c3199.tar.xz linux-854d128b8c6c4fa47810ac7cf87c16b8085c3199.zip |
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/tegra')
-rw-r--r-- | drivers/soc/tegra/fuse/fuse-tegra.c | 6 |
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; |