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 <redacted>
---
drivers/rtc/rtc-asm9260.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/rtc/rtc-asm9260.c b/drivers/rtc/rtc-asm9260.c
index 355fdb9..5ddcc91 100644
--- a/drivers/rtc/rtc-asm9260.c
+++ b/drivers/rtc/rtc-asm9260.c
@@ -267,6 +267,7 @@ static int asm9260_rtc_probe(struct platform_device *pdev)
if (!priv)
return -ENOMEM;
+ spin_lock_init(&priv->lock);
priv->dev = &pdev->dev;
platform_set_drvdata(pdev, priv);
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.