* [bug report] clocksource/drivers: Add timer-of common init routine
@ 2017-06-23 10:44 Dan Carpenter
2017-06-23 10:51 ` Daniel Lezcano
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2017-06-23 10:44 UTC (permalink / raw)
To: kernel-janitors
Hello Daniel Lezcano,
The patch dc11bae78529: "clocksource/drivers: Add timer-of common
init routine" from Jun 5, 2017, leads to the following static checker
warning:
drivers/clocksource/timer-of.c:160 timer_of_init()
error: uninitialized symbol 'ret'.
drivers/clocksource/timer-of.c
131 int __init timer_of_init(struct device_node *np, struct timer_of *to)
132 {
133 int ret;
134 int flags = 0;
135
136 if (to->flags & TIMER_OF_BASE) {
137 ret = timer_base_init(np, &to->of_base);
138 if (ret)
139 goto out_fail;
140 flags |= TIMER_OF_BASE;
141 }
142
143 if (to->flags & TIMER_OF_CLOCK) {
144 ret = timer_clk_init(np, &to->of_clk);
145 if (ret)
146 goto out_fail;
147 flags |= TIMER_OF_CLOCK;
148 }
149
150 if (to->flags & TIMER_OF_IRQ) {
151 ret = timer_irq_init(np, &to->of_irq);
152 if (ret)
153 goto out_fail;
154 flags |= TIMER_OF_IRQ;
155 }
156
157 if (!to->clkevt.name)
158 to->clkevt.name = np->name;
159 out:
160 return ret;
^^^^^^^^^^
Presumably one of the TIMER_OF_IRQ flags is always set, but there are no
callers so it's hard to tell.
161
162 out_fail:
163 if (flags & TIMER_OF_IRQ)
164 timer_irq_exit(&to->of_irq);
165
166 if (flags & TIMER_OF_CLOCK)
167 timer_clk_exit(&to->of_clk);
168
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-23 10:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-23 10:44 [bug report] clocksource/drivers: Add timer-of common init routine Dan Carpenter
2017-06-23 10:51 ` Daniel Lezcano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox