From: Marek Szyprowski <m.szyprowski@samsung.com>
To: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: [PATCH] PM / Domains: fix early device initialization failure
Date: Thu, 09 Aug 2012 16:31:34 +0200 [thread overview]
Message-ID: <1344522694-31164-1-git-send-email-m.szyprowski@samsung.com> (raw)
dev_pm_get_subsys_data() returns 1 when a new object has been created,
what should not be considered as an error for pm_genpd_add_device().
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
drivers/base/power/domain.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index ba3487c..6b61819 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -1323,9 +1323,16 @@ 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;
+ /*
+ * dev_pm_get_subsys_data() returns 1 when new object has been created
+ */
+ if (ret == 1)
+ ret = 0;
+
genpd->device_count++;
genpd->max_off_time_changed = true;
--
1.7.1.569.g6f426
next reply other threads:[~2012-08-09 14:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-09 14:31 Marek Szyprowski [this message]
2012-08-09 19:30 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1344522694-31164-1-git-send-email-m.szyprowski@samsung.com \
--to=m.szyprowski@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®