summaryrefslogtreecommitdiff
path: root/drivers/base/power/clock_ops.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-08-07 15:50:14 +0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-08-08 22:49:33 +0400
commit77254950bb174d637cd88d1a74e137ecf3185a65 (patch)
treebd7714b590a9d16d35c3b95e42d7454e5254b0c3 /drivers/base/power/clock_ops.c
parentd06a8a4fe7d81e8d1fa3d753be9b14c785b4b2e7 (diff)
downloadlinux-77254950bb174d637cd88d1a74e137ecf3185a65.tar.xz
PM: Make dev_pm_get_subsys_data() always return 0 on success
Commits 1d5fcfec22 (PM / Domains: Add device domain data reference counter) and 62d4490294 (PM / Domains: Allow device callbacks to be added at any time) added checks for the return value of dev_pm_get_subsys_data(), but those checks were incorrect, because that function returned 1 on success in some cases. Since all of the existing users of dev_pm_get_subsys_data() don't use the positive value returned by it on success, change its definition so that it always returns 0 when successful. Reported-by: Heiko Stübner <heiko@sntech.de> Reported-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers/base/power/clock_ops.c')
-rw-r--r--drivers/base/power/clock_ops.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c
index 869d7ff2227f..eb78e9640c4a 100644
--- a/drivers/base/power/clock_ops.c
+++ b/drivers/base/power/clock_ops.c
@@ -169,8 +169,7 @@ void pm_clk_init(struct device *dev)
*/
int pm_clk_create(struct device *dev)
{
- int ret = dev_pm_get_subsys_data(dev);
- return ret < 0 ? ret : 0;
+ return dev_pm_get_subsys_data(dev);
}
/**