Merge branch 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal...
[pandora-kernel.git] / drivers / power / power_supply_sysfs.c
index cd1f907..605514a 100644 (file)
@@ -270,7 +270,7 @@ int power_supply_uevent(struct device *dev, struct kobj_uevent_env *env)
                attr = &power_supply_attrs[psy->properties[j]];
 
                ret = power_supply_show_property(dev, attr, prop_buf);
-               if (ret == -ENODEV) {
+               if (ret == -ENODEV || ret == -ENODATA) {
                        /* When a battery is absent, we expect -ENODEV. Don't abort;
                           send the uevent with at least the the PRESENT=0 property */
                        ret = 0;