Skip to content

Commit

Permalink
rtc: sun6i: Remove double init of spinlock in sun6i_rtc_clk_init()
Browse files Browse the repository at this point in the history
Remove double init of spinlock in sun6i_rtc_clk_init()

Fixes: 847b8bf62eb4 ("rtc: sun6i: Expose the 32kHz oscillator")
Signed-off-by: Alexey Klimov <alexey.klimov@arm.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
  • Loading branch information
Alexey Klimov authored and Alexandre Belloni committed Jul 30, 2017
1 parent 11909f0 commit 319ff83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-sun6i.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 319ff83

Please sign in to comment.