Commit 36ffbbc2 authored by Jie Gan's avatar Jie Gan Committed by Suzuki K Poulose
Browse files

coresight: ctcu: fix the spin_bug



Acquiring an uninitialized raw_spin_lock is invalid and may trigger
unexpected behavior or spin_bug.

Fixes: f78d206f ("Coresight: Add Coresight TMC Control Unit driver")
Signed-off-by: default avatarJie Gan <jie.gan@oss.qualcomm.com>
Reviewed-by: default avatarJames Clark <james.clark@linaro.org>
Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20260219-fix-spin-lock-issue-v1-1-557f7d513d7e@oss.qualcomm.com
parent eef33a7c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -226,6 +226,7 @@ static int ctcu_probe(struct platform_device *pdev)
	desc.dev = dev;
	desc.ops = &ctcu_ops;
	desc.access = CSDEV_ACCESS_IOMEM(base);
	raw_spin_lock_init(&drvdata->spin_lock);

	drvdata->csdev = coresight_register(&desc);
	if (IS_ERR(drvdata->csdev))