mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
qcacld-3.0: Flush packets in datapath error case
Several packets are sent to firmware in htt_htc_attach_all(), back to back. However, if one of the latter packets fails to send for some reason, the previous packets are not flushed. This leads to a number of leaks under error conditions. If a packet fails to send in htt_htc_attach_all(), flush the endpoint before returning failure to the upper layers. Change-Id: If9b33a645f7bcc77442e18566525ae57b544f1a0 CRs-Fixed: 2219137
This commit is contained in:
parent
21f0bf56e8
commit
95ff87c60e
1 changed files with 11 additions and 3 deletions
|
|
@ -338,12 +338,20 @@ static int
|
|||
htt_htc_attach_all(struct htt_pdev_t *pdev)
|
||||
{
|
||||
if (htt_htc_attach(pdev, HTT_DATA_MSG_SVC))
|
||||
return -EIO;
|
||||
goto flush_endpoint;
|
||||
|
||||
if (htt_htc_attach(pdev, HTT_DATA2_MSG_SVC))
|
||||
return -EIO;
|
||||
goto flush_endpoint;
|
||||
|
||||
if (htt_htc_attach(pdev, HTT_DATA3_MSG_SVC))
|
||||
return -EIO;
|
||||
goto flush_endpoint;
|
||||
|
||||
return 0;
|
||||
|
||||
flush_endpoint:
|
||||
htc_flush_endpoint(pdev->htc_pdev, ENDPOINT_0, HTC_TX_PACKET_TAG_ALL);
|
||||
|
||||
return -EIO;
|
||||
}
|
||||
#else
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue