net: ipa: pass memory configuration data to ipa_mem_valid()
authorAlex Elder <elder@linaro.org>
Wed, 9 Jun 2021 22:34:59 +0000 (17:34 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Jun 2021 22:59:33 +0000 (15:59 -0700)
commit1eec767746e5fe4e4376ad511558de3c77f49d82
treece5032e0d824d4c8cf17c03f55f464566d1459f9
parent2f9be1e90860e8acb43dc164e25c0d0be60f6a7b
net: ipa: pass memory configuration data to ipa_mem_valid()

Pass the memory configuration data array to ipa_mem_valid() for
validation, and use that rather than assuming it's already been
recorded in the IPA structure.  Move the memory data array size
check into ipa_mem_valid().

Call ipa_mem_valid() early in ipa_mem_init(), and only proceed with
assigning the memory array pointer and size if it is found to be
valid.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/ipa_mem.c