net: ipa: fix bug in resource group limit programming
authorAlex Elder <elder@linaro.org>
Fri, 26 Mar 2021 15:11:12 +0000 (10:11 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Mar 2021 22:02:38 +0000 (15:02 -0700)
commita749c6c03762f71ba4d04ead60b4f5df9ca2bf5e
treeb7a61eaa8156241e4cacffabc79fb19a4039ed82
parentee3e6beaa015ff1526440bf31f1782b6daa772da
net: ipa: fix bug in resource group limit programming

If the number of resource groups supported by the hardware is less
than a certain number, we return early in ipa_resource_config_src()
and ipa_resource_config_dst() (to avoid programming resource limits
for non-existent groups).

Unfortunately, these checks are off by one.  Fix this problem in the
four places it occurs.

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