diff mbox

clocksource/drivers/atmel-pit: Fix compilation error

Message ID 1472453043-24287-1-git-send-email-daniel.lezcano@linaro.org
State Accepted
Commit 98744b408c757901df57fa50cbd5826245dc3a1f
Headers show

Commit Message

Daniel Lezcano Aug. 29, 2016, 6:44 a.m. UTC
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'.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

---
 drivers/clocksource/timer-atmel-pit.c | 1 +
 1 file changed, 1 insertion(+)

-- 
1.9.1

Comments

Daniel Lezcano Aug. 29, 2016, 6:50 a.m. UTC | #1
On 08/29/2016 08:44 AM, Daniel Lezcano wrote:
> 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'.

> 

> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

> ---


Thomas,

do you mind to directly apply this patch ?

Thanks

  -- Daniel

-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
diff mbox

Patch

diff --git a/drivers/clocksource/timer-atmel-pit.c b/drivers/clocksource/timer-atmel-pit.c
index 3494bc5..7f0f5b2 100644
--- a/drivers/clocksource/timer-atmel-pit.c
+++ b/drivers/clocksource/timer-atmel-pit.c
@@ -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)