Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 224fd98c authored by Yuanfang Zhang's avatar Yuanfang Zhang Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarYuanfang Zhang <quic_yuanfang@quicinc.com>
parent bb300e0c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);