Code indent and clean.

Signed-off-by: Shanjin Yang <sjyang@credosemi.com>
Add some security check, modify timer function bug and list_insert_spec function bug.

Signed-off-by: Shanjin Yang <sjyang@credosemi.com>