slim-msm: Handling resources during port de-allocation
In port de-allocate operation free the resources only if port is connected as memory allocates while connecting the port. Change-Id: I743a27025e83f0f4bb8a47c20b2bb2d4cff80caa Signed-off-by: Dilip Kota <dkota@codeaurora.org>
This commit is contained in:
parent
f303bb651b
commit
b5bc5681c5
1 changed files with 4 additions and 4 deletions
|
@ -392,13 +392,13 @@ void msm_dealloc_port(struct slim_controller *ctrl, u8 pn)
|
|||
if (pn >= dev->port_nums)
|
||||
return;
|
||||
endpoint = &dev->pipes[pn];
|
||||
if (dev->pipes[pn].connected)
|
||||
msm_slim_disconn_pipe_port(dev, pn);
|
||||
if (endpoint->sps) {
|
||||
if (dev->pipes[pn].connected) {
|
||||
struct sps_connect *config = &endpoint->config;
|
||||
msm_slim_free_endpoint(endpoint);
|
||||
msm_slim_disconn_pipe_port(dev, pn);
|
||||
msm_slim_sps_mem_free(dev, &config->desc);
|
||||
}
|
||||
if (endpoint->sps)
|
||||
msm_slim_free_endpoint(endpoint);
|
||||
}
|
||||
|
||||
enum slim_port_err msm_slim_port_xfer_status(struct slim_controller *ctr,
|
||||
|
|
Loading…
Add table
Reference in a new issue