mfd: Check twl4030-power remove script error condition after i2cwrite
authorLesly A M <leslyam@ti.com>
Wed, 4 May 2011 12:08:53 +0000 (17:38 +0530)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 26 May 2011 17:45:41 +0000 (19:45 +0200)
Fixing the error condition check in twl4030 remove script function.
Due to some typo in commit ID: 11a441ce82d6ffecfd39b324024de0cd630b36c1

Signed-off-by: Lesly A M <leslyam@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/twl4030-power.c

index 8162e435c9ff35408c7471631f0b27c31287c459..a764676f09220146fb0ebc84addfe5e79ad9943e 100644 (file)
@@ -485,9 +485,9 @@ int twl4030_remove_script(u8 flags)
                        return err;
        }
        if (flags & TWL4030_WAKEUP12_SCRIPT) {
-               if (err)
                err = twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, END_OF_SCRIPT,
                                R_SEQ_ADD_S2A12);
+               if (err)
                        return err;
        }
        if (flags & TWL4030_WAKEUP3_SCRIPT) {