summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorJon Hunter <jon-hunter@ti.com>2012-11-09 17:07:39 -0600
committerJon Hunter <jon-hunter@ti.com>2012-11-16 10:35:07 -0600
commitf88095ba07c312fd4b309545553e1492cb227227 (patch)
tree3b446a9b776dcbb4588aafaeb48b21da9809cb81 /arch/arm/mach-omap2
parent61b001c564b75bfb47bfb84b33008fc2a35c9a84 (diff)
ARM: OMAP2+: Remove unnecessary local variable in timer code
The function omap_dm_timer_init_one() declares two local variables of type int that are used to store the return value of functions called. One such local variable is sufficient and so remove one of these local variables. Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/timer.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index e9fcc5faff5c..1a662dfdda11 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -246,8 +246,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
struct device_node *np;
struct omap_hwmod *oh;
struct resource irq, mem;
- int res = 0;
- int r;
+ int r = 0;
if (of_have_populated_dt()) {
np = omap_get_timer_dt(omap_timer_match, NULL);
@@ -307,10 +306,10 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
src = clk_get(NULL, fck_source);
if (IS_ERR(src)) {
- res = -EINVAL;
+ r = -EINVAL;
} else {
- res = clk_set_parent(timer->fclk, src);
- if (IS_ERR_VALUE(res))
+ r = clk_set_parent(timer->fclk, src);
+ if (IS_ERR_VALUE(r))
pr_warn("%s: %s cannot set source\n",
__func__, oh->name);
clk_put(src);
@@ -331,7 +330,7 @@ static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
timer->rate = clk_get_rate(timer->fclk);
timer->reserved = 1;
- return res;
+ return r;
}
static void __init omap2_gp_clockevent_init(int gptimer_id,