ARM: tegra: power: Fix-up return value
Shridhar Rasal [Wed, 23 Nov 2011 08:58:18 +0000 (13:58 +0530)]
Fixes the return value for tegra_powergate_set () when new status
to be set and current status are same.

Change-Id: Iffbc4fac239c4ea21f3026cbf33fe4fb7941aa2d
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/66404
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>

Rebase-Id: Rbdab9a71478fde0902191c85ac6340b74907d70d

arch/arm/mach-tegra/powergate.c

index 1b1b74e..f1967a8 100644 (file)
@@ -449,7 +449,7 @@ static int tegra_powergate_set(int id, bool new_state)
 
        if (status == new_state) {
                spin_unlock_irqrestore(&tegra_powergate_lock, flags);
-               return -EINVAL;
+               return 0;
        }
 
        if (tegra_is_cpu_powergate_id(id)) {