PM / Domains: Only check for errors when calling dev_pm_get_subsys_data

A patch from »PM / Domains: Only check for errors when calling dev_pm_get_subsys_data« in state Obsolete for linux-kernel

From: Heiko Stuebner <heiko@...> Date: Sun, 5 Aug 2012 22:15:26 +0200

Commit-Message

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@...>

Patch-Comment

This got superseeded by a patch that completely removes the "1" output from dev_pm_get_subsys_data drivers/base/power/domain.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

Statistics

  • 1 lines added
  • 1 lines removed

Changes

------------------------- drivers/base/power/domain.c --------------------------
index ba3487c..5959fcb 100644
@@ -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++;
 
 

Recent Patches

About Us

Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec metus placerat consectetuer.

Read More...