]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
clocksource/drivers/time-lpc32xx: Convert init function to return error
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 6 Jun 2016 16:00:27 +0000 (18:00 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 28 Jun 2016 08:19:27 +0000 (10:19 +0200)
commit4e2afeb9e653d4201039f06c02a37312bc38c3b8
tree95a370c4c31262b1d87bbc46ba1cf14c5501b257
parentdc5011131b8c78d1f5040bf0f79b7c38b4211fe6
clocksource/drivers/time-lpc32xx: Convert init function to return error

The init functions do not return any error. They behave as the following:

  - panic, thus leading to a kernel crash while another timer may work and
       make the system boot up correctly

  or

  - print an error and let the caller unaware if the state of the system

Change that by converting the init functions to return an error conforming
to the CLOCKSOURCE_OF_RET prototype.

Proper error handling (rollback, errno value) will be changed later case
by case, thus this change just return back an error or success in the init
function.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Sylvain Lemieux <slemieux.tyco@gmail.com>
drivers/clocksource/time-lpc32xx.c