]> Pileus Git - ~andy/linux/blobdiff - drivers/power/wm97xx_battery.c
Merge tag 'for-v3.7' of git://git.infradead.org/battery-2.6
[~andy/linux] / drivers / power / wm97xx_battery.c
index d2d4c08c681cd99f1eef9b1a477830289b533f70..e128a813dc24c33ea54f476c618cdf9218fa0431 100644 (file)
@@ -146,7 +146,7 @@ static irqreturn_t wm97xx_chrg_irq(int irq, void *data)
 #ifdef CONFIG_PM
 static int wm97xx_bat_suspend(struct device *dev)
 {
-       flush_work_sync(&bat_work);
+       flush_work(&bat_work);
        return 0;
 }
 
@@ -212,8 +212,10 @@ static int __devinit wm97xx_bat_probe(struct platform_device *dev)
                props++;        /* POWER_SUPPLY_PROP_VOLTAGE_MIN */
 
        prop = kzalloc(props * sizeof(*prop), GFP_KERNEL);
-       if (!prop)
+       if (!prop) {
+               ret = -ENOMEM;
                goto err3;
+       }
 
        prop[i++] = POWER_SUPPLY_PROP_PRESENT;
        if (pdata->charge_gpio >= 0)