From cebca729273e83f2221a57474756366e4701c3dd Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Wed, 6 Nov 2019 12:00:21 +0000 Subject: [PATCH] BACKPORT:FROMGIT: coresight: funnel: Fix missing spin_lock_init() Backport: context code is different from upstream. The driver allocates the spinlock but not initialize it. Use spin_lock_init() on it to initialize it correctly. This is detected by Coccinelle semantic patch. Signed-off-by: Wei Yongjun Tested-by: Yabin Cui Signed-off-by: Mathieu Poirier (cherry picked from commit 9d5ec2ec787967f16598094de507a60816378fae https://git.linaro.org/kernel/coresight.git next) Bug: 140266694 Change-Id: If774a5343da0abd63f89336fb848f8ce3b6dd132 Signed-off-by: Yabin Cui --- drivers/hwtracing/coresight/coresight-funnel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hwtracing/coresight/coresight-funnel.c b/drivers/hwtracing/coresight/coresight-funnel.c index f5275e19a99c..e69c0ec64ae0 100644 --- a/drivers/hwtracing/coresight/coresight-funnel.c +++ b/drivers/hwtracing/coresight/coresight-funnel.c @@ -236,6 +236,7 @@ static int funnel_probe(struct amba_device *adev, const struct amba_id *id) drvdata->base = base; pm_runtime_put(&adev->dev); + spin_lock_init(&drvdata->spinlock); desc.type = CORESIGHT_DEV_TYPE_LINK; desc.subtype.link_subtype = CORESIGHT_DEV_SUBTYPE_LINK_MERG; desc.ops = &funnel_cs_ops;