cpuidle: fix error handling in __cpuidle_register_device

Fix the error handling in __cpuidle_register_device to include
the missing list_del.  Move it to a label, which will simplify
the error handling when coupled states are added.

Reviewed-by: Santosh Shilimkar <[email protected]>
Tested-by: Santosh Shilimkar <[email protected]>
Reviewed-by: Kevin Hilman <[email protected]>
Tested-by: Kevin Hilman <[email protected]>
Signed-off-by: Colin Cross <[email protected]>
Reviewed-by: Rafael J. Wysocki <[email protected]>
Signed-off-by: Len Brown <[email protected]>
1 file changed