summaryrefslogtreecommitdiffstats
path: root/drivers/hwtracing
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2019-11-18 11:52:06 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-19 19:18:15 +0100
commit9def5dc10d3e21cf7673731be21224b6cc0eb16a (patch)
tree957a6d0e47d349921ddb8a615ec98bcb4a54296f /drivers/hwtracing
parent7a7ebfa85f4fac349f3ab219538c44efe18b0cf6 (diff)
downloadlinux-9def5dc10d3e21cf7673731be21224b6cc0eb16a.tar.gz
linux-9def5dc10d3e21cf7673731be21224b6cc0eb16a.tar.bz2
linux-9def5dc10d3e21cf7673731be21224b6cc0eb16a.zip
coresight: funnel: Fix missing spin_lock_init()
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 <weiyongjun1@huawei.com> Tested-by: Yabin Cui <yabinc@google.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20191118185207.30441-2-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing')
-rw-r--r--drivers/hwtracing/coresight/coresight-funnel.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hwtracing/coresight/coresight-funnel.c b/drivers/hwtracing/coresight/coresight-funnel.c
index b605889b507a..900690a9f7f0 100644
--- a/drivers/hwtracing/coresight/coresight-funnel.c
+++ b/drivers/hwtracing/coresight/coresight-funnel.c
@@ -253,6 +253,7 @@ static int funnel_probe(struct device *dev, struct resource *res)
}
dev->platform_data = pdata;
+ 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;