slim-msm-ngd:Avoid using stale pipe handle
Make sure to use pipe handle from the TX endpoint rather than using a stored handle. The stored handle may become invalid if SSR happens between storing of that handle and locking the mutex. Change-Id: I53e8f860c2d50061b6c4e6ce2f944c1e2ed8dff2 Signed-off-by: Dilip Kota <dkota@codeaurora.org>
This commit is contained in:
parent
c69a4a60de
commit
9a5cd01d7b
|
@ -711,7 +711,6 @@ static int ngd_bulk_wr(struct slim_controller *ctrl, u8 la, u8 mt, u8 mc,
|
|||
struct msm_slim_ctrl *dev = slim_get_ctrldata(ctrl);
|
||||
int i, ret;
|
||||
struct msm_slim_endp *endpoint = &dev->tx_msgq;
|
||||
struct sps_pipe *pipe = endpoint->sps;
|
||||
u32 *header;
|
||||
DECLARE_COMPLETION_ONSTACK(done);
|
||||
|
||||
|
@ -808,8 +807,8 @@ static int ngd_bulk_wr(struct slim_controller *ctrl, u8 la, u8 mt, u8 mc,
|
|||
goto retpath;
|
||||
}
|
||||
|
||||
ret = sps_transfer_one(pipe, dev->bulk.wr_dma, dev->bulk.size, NULL,
|
||||
SPS_IOVEC_FLAG_EOT);
|
||||
ret = sps_transfer_one(endpoint->sps, dev->bulk.wr_dma, dev->bulk.size,
|
||||
NULL, SPS_IOVEC_FLAG_EOT);
|
||||
if (ret) {
|
||||
SLIM_WARN(dev, "sps transfer one returned error:%d", ret);
|
||||
goto retpath;
|
||||
|
|
Loading…
Reference in New Issue