* [PATCH -next] coresight: funnel: Fix missing spin_lock_init()
@ 2019-11-06 12:00 Wei Yongjun
2019-11-06 18:47 ` Yabin Cui
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2019-11-06 12:00 UTC (permalink / raw)
To: Mathieu Poirier, Suzuki K Poulose, Alexander Shishkin, Yabin Cui
Cc: Wei Yongjun, linux-arm-kernel, linux-kernel, kernel-janitors
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.
Fixes: 0093875ad129 ("coresight: Serialize enabling/disabling a link device.")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
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 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;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-06 18:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06 12:00 [PATCH -next] coresight: funnel: Fix missing spin_lock_init() Wei Yongjun
2019-11-06 18:47 ` Yabin Cui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®