[PATCH] idlestat: Replace asserts with proper error handlings