[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <201208052225.09503.heiko@sntech.de>
Date: Sun, 5 Aug 2012 22:25:08 +0200
From: Heiko Stübner <heiko@...ech.de>
To: Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
"Rafael J. Wysocki" <rjw@...k.pl>,
"Greg Kroah-Hartman" <gregkh@...uxfoundation.org>
Cc: linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] PM / Domains: Only check for errors when calling dev_pm_get_subsys_data
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@...ech.de>
---
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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists