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

Commit f28e9664 authored by Rama Aparna Mallavarapu's avatar Rama Aparna Mallavarapu
Browse files

coresight: tmc: Fix the spinlock release in tmc etr disable function



Release the spinlock acquired before a mutex lock is acquired by the TMC
BAM disable function.

Change-Id: I3d3403235297ba780d919527d286f459c3613e49
Signed-off-by: default avatarRama Aparna Mallavarapu <aparnam@codeaurora.org>
parent 9a9731d6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -525,8 +525,10 @@ static void tmc_disable_etr_sink(struct coresight_device *csdev)
	if (val != CS_MODE_DISABLED) {
		if (drvdata->out_mode == TMC_ETR_OUT_MODE_USB) {
			__tmc_etr_disable_to_bam(drvdata);
			spin_unlock_irqrestore(&drvdata->spinlock, flags);
			tmc_etr_bam_disable(drvdata);
			usb_qdss_close(drvdata->usbch);
			goto out;
		} else {
			tmc_etr_disable_hw(drvdata);
		}
@@ -539,6 +541,7 @@ static void tmc_disable_etr_sink(struct coresight_device *csdev)
		coresight_cti_unmap_trigin(drvdata->cti_reset, 2, 0);
		coresight_cti_unmap_trigout(drvdata->cti_flush, 3, 0);
	}
out:
	mutex_unlock(&drvdata->mem_lock);
	dev_info(drvdata->dev, "TMC-ETR disabled\n");
}