diff --git a/drivers/net/ipa/ipa_mem.c b/drivers/net/ipa/ipa_mem.c index f245e1a60a44b6f56639cafbb33505834dfff60e..b2d149e7c5f0ef74005a38e839e7f9558180b02c 100644 --- a/drivers/net/ipa/ipa_mem.c +++ b/drivers/net/ipa/ipa_mem.c @@ -215,10 +215,6 @@ int ipa_mem_config(struct ipa *ipa) ipa->zero_virt = virt; ipa->zero_size = IPA_MEM_MAX; - /* Make sure all defined memory regions are valid */ - if (!ipa_mem_valid(ipa)) - goto err_dma_free; - /* For each region, write "canary" values in the space prior to * the region's base address if indicated. */ @@ -528,6 +524,10 @@ int ipa_mem_init(struct ipa *ipa, const struct ipa_mem_data *mem_data) ipa->mem_count = mem_data->local_count; ipa->mem = mem_data->local; + /* Make sure all defined memory regions are valid */ + if (!ipa_mem_valid(ipa)) + goto err_unmap; + ret = ipa_imem_init(ipa, mem_data->imem_addr, mem_data->imem_size); if (ret) goto err_unmap;