Skip to content

Commit

Permalink
clocksource/drivers/atmel-pit: Fix compilation error
Browse files Browse the repository at this point in the history
The previous fix introduced a check against the ret variable which
is not defined, hence producing a compilation error:

linux/drivers/clocksource/timer-atmel-pit.c: In function ‘at91sam926x_pit_dt_init’:
linux/drivers/clocksource/timer-atmel-pit.c:264:2: error: ‘ret’ undeclared (first use in this function)
  ret = clk_prepare_enable(data->mck);
  ^
linux/drivers/clocksource/timer-atmel-pit.c:264:2: note: each undeclared identifier is reported only once for each function it appears in

Add the missing the variable 'ret'.

Fixes: 504f34c "clocksource/drivers/atmel-pit: Convert init function to return error"
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: alexandre.belloni@free-electrons.com
Cc: motobud@gmail.com
Cc: realbright@lgcns.com
Link: http://lkml.kernel.org/r/1472453043-24287-1-git-send-email-daniel.lezcano@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
dlezcano authored and Thomas Gleixner committed Aug 29, 2016
1 parent 3eab887 commit 98744b4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/clocksource/timer-atmel-pit.c
Expand Up @@ -240,6 +240,7 @@ static int __init at91sam926x_pit_common_init(struct pit_data *data)
static int __init at91sam926x_pit_dt_init(struct device_node *node)
{
struct pit_data *data;
int ret;

data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data)
Expand Down

0 comments on commit 98744b4

Please sign in to comment.