Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1449317 > unrolled thread

[PATCH -next] rtc: at91sam9: Fix missing spin_lock_init()

Started byWei Yongjun <weiyj.lk@gmail.com>
First post2016-07-25 09:10 +0200
Last post2016-07-25 09:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH -next] rtc: at91sam9: Fix missing spin_lock_init() Wei Yongjun <weiyj.lk@gmail.com> - 2016-07-25 09:10 +0200

#1449317 — [PATCH -next] rtc: at91sam9: Fix missing spin_lock_init()

FromWei Yongjun <weiyj.lk@gmail.com>
Date2016-07-25 09:10 +0200
Subject[PATCH -next] rtc: at91sam9: Fix missing spin_lock_init()
Message-ID<rYIbw-1BM-15@gated-at.bofh.it>
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@gmail.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 */

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web