From 319ff835d6136842c660011047a480119bd7cba8 Mon Sep 17 00:00:00 2001 From: Alexey Klimov Date: Wed, 12 Jul 2017 11:59:48 +0100 Subject: rtc: sun6i: Remove double init of spinlock in sun6i_rtc_clk_init() Remove double init of spinlock in sun6i_rtc_clk_init() Fixes: 847b8bf62eb4 ("rtc: sun6i: Expose the 32kHz oscillator") Signed-off-by: Alexey Klimov Reviewed-by: Chen-Yu Tsai Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-sun6i.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/rtc/rtc-sun6i.c') diff --git a/drivers/rtc/rtc-sun6i.c b/drivers/rtc/rtc-sun6i.c index 39cbc1238b92..7e7da604682b 100644 --- a/drivers/rtc/rtc-sun6i.c +++ b/drivers/rtc/rtc-sun6i.c @@ -193,12 +193,12 @@ static void __init sun6i_rtc_clk_init(struct device_node *node) rtc = kzalloc(sizeof(*rtc), GFP_KERNEL); if (!rtc) return; - spin_lock_init(&rtc->lock); clk_data = kzalloc(sizeof(*clk_data) + sizeof(*clk_data->hws), GFP_KERNEL); if (!clk_data) return; + spin_lock_init(&rtc->lock); rtc->base = of_io_request_and_map(node, 0, of_node_full_name(node)); -- cgit