Message ID | 201208052225.09503.heiko@sntech.de (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
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++;
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 <heiko@sntech.de> --- against 3.6-rc1 drivers/base/power/domain.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)