Commit b7b17633 authored by Wei Yongjun's avatar Wei Yongjun Committed by Alexandre Belloni
Browse files

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: default avatarWei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
parent ae036af8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 */