Skip to content
Commit 77254950 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

PM: Make dev_pm_get_subsys_data() always return 0 on success

Commits 1d5fcfec (PM / Domains: Add device domain data reference
counter) and 62d44902

 (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: default avatarHeiko Stübner <heiko@sntech.de>
Reported-by: default avatarTushar Behera <tushar.behera@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
parent d06a8a4f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment