Commit 1d5fcfec22 (PM / Domains: Add device domain data reference counter)
added a check for the return value of dev_pm_get_subsys_data.

But this function does not only return error codes but also "1" when a
new object has been created.

So, change the check to only catch real errors.

Signed-off-by: Heiko Stuebner <[email protected]>
---
against 3.6-rc1

 drivers/base/power/domain.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index ba3487c..5959fcb 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -1323,7 +1323,7 @@ int __pm_genpd_add_device(struct generic_pm_domain 
*genpd, struct device *dev,
                }
 
        ret = dev_pm_get_subsys_data(dev);
-       if (ret)
+       if (ret < 0)
                goto out;
 
        genpd->device_count++;
-- 
1.7.2.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to