[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1469430311-8651-1-git-send-email-weiyj.lk@gmail.com>
Date: Mon, 25 Jul 2016 07:05:11 +0000
From: Wei Yongjun <weiyj.lk@...il.com>
To: Alessandro Zummo <a.zummo@...ertech.it>,
Alexandre Belloni <alexandre.belloni@...e-electrons.com>
Cc: Wei Yongjun <weiyj.lk@...il.com>, rtc-linux@...glegroups.com,
linux-kernel@...r.kernel.org
Subject: [PATCH -next] rtc: at91sam9: 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 <weiyj.lk@...il.com>
---
drivers/rtc/rtc-at91sam9.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
index 99732e6..7418a76 100644
--- a/drivers/rtc/rtc-at91sam9.c
+++ b/drivers/rtc/rtc-at91sam9.c
@@ -375,6 +375,7 @@ static int at91_rtc_probe(struct platform_device *pdev)
if (!rtc)
return -ENOMEM;
+ spin_lock_init(&rtc->lock);
rtc->irq = irq;
/* platform setup code should have handled this; sigh */
Powered by blists - more mailing lists