diff options
author | Wei Yongjun <[email protected]> | 2019-11-18 11:52:07 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2019-11-19 19:18:15 +0100 |
commit | 9a5d847c0bdadb67892b7d176a028578aaed0c3a (patch) | |
tree | 7aa253b40cc1636e245b717a03ad4512d61393ee | |
parent | 9def5dc10d3e21cf7673731be21224b6cc0eb16a (diff) |
coresight: replicator: 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 <[email protected]>
Tested-by: Yabin Cui <[email protected]>
Signed-off-by: Mathieu Poirier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/hwtracing/coresight/coresight-replicator.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hwtracing/coresight/coresight-replicator.c b/drivers/hwtracing/coresight/coresight-replicator.c index 43304196a1a6..e7dc1c31d20d 100644 --- a/drivers/hwtracing/coresight/coresight-replicator.c +++ b/drivers/hwtracing/coresight/coresight-replicator.c @@ -248,6 +248,7 @@ static int replicator_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_SPLIT; desc.ops = &replicator_cs_ops; |