ARM: OMAP: CPUidle: Unregister drivere on device registration failure
authorSantosh Shilimkar <santosh.shilimkar@ti.com>
Mon, 25 Mar 2013 10:05:05 +0000 (15:35 +0530)
committerKevin Hilman <khilman@linaro.org>
Tue, 9 Apr 2013 16:45:45 +0000 (09:45 -0700)
commit63b951ed5b82c2891982437d1f57cb94dc0b3757
treec46595fae5a5691dacc7baf046d2af476209818d
parentdbd1ba6a62408520e5c7a024b521af14e71b2987
ARM: OMAP: CPUidle: Unregister drivere on device registration failure

If the CPUidle device registration fails for some reason, we should
unregister the driver on error path.

Fix the code accordingly. Also when at it, check of the driver registration
failure too.

Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
arch/arm/mach-omap2/cpuidle34xx.c
arch/arm/mach-omap2/cpuidle44xx.c