mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 15:49:17 -04:00
byte-cntr: check pcie channel status before closing it
Check pcie channel status before call the close channel API, only closed it when it in open state. Change-Id: Ib3bee9575edfae0cc907baee4956d6e3a6c78d61 Signed-off-by: Yuanfang Zhang <quic_yuanfang@quicinc.com>
This commit is contained in:
parent
bb300e0c64
commit
224fd98c51
1 changed files with 1 additions and 1 deletions
|
|
@ -182,7 +182,7 @@ EXPORT_SYMBOL(tmc_etr_byte_cntr_stop);
|
|||
|
||||
static void etr_pcie_close_channel(struct byte_cntr *byte_cntr_data)
|
||||
{
|
||||
if (!byte_cntr_data)
|
||||
if (!byte_cntr_data || !byte_cntr_data->pcie_chan_opened)
|
||||
return;
|
||||
|
||||
mutex_lock(&byte_cntr_data->byte_cntr_lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue