]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipa: fix a bug in ipa_endpoint_stop()
authorAlex Elder <elder@linaro.org>
Mon, 4 May 2020 23:53:41 +0000 (18:53 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 May 2020 00:41:11 +0000 (17:41 -0700)
commit6a4377344b8d5badb8d390f453a1fb64c76abbe9
tree67f005ecd986b25a0bbd6fd0f501c18c25df19d5
parent626b97885d00f73b5c05e14bb3a51461737a5eba
net: ipa: fix a bug in ipa_endpoint_stop()

In ipa_endpoint_stop(), for TX endpoints we set the number of retries
to 0.  When we break out of the loop, retries being 0 means we return
EIO rather than the value of ret (which should be 0).

Fix this by using a non-zero retry count for both RX and TX
channels, and just break out of the loop after calling
gsi_channel_stop() for TX channels.  This way only RX channels
will retry, and the retry count will be non-zero at the end
for TX channels (so the proper value gets returned).

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 61d74e9c3d96956503f4d6cecd1857ef095bb7f3)
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/ipa_endpoint.c