提交 4fcac10d 编写于 作者: H Huang Ying 提交者: Rafael J. Wysocki

PM / Domains: Fix link checking when add subdomain

Current pm_genpd_add_subdomain() will allow duplicated link between
master and slave domain.  This patch fixed it.

Because when current pm_genpd_add_subdomain() checks whether the link
between the master and slave generic PM domain already exists,
slave_links instead of master_links of master domain is used.
Signed-off-by: NHuang Ying <ying.huang@intel.com>
Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
上级 6ff7bb0d
......@@ -1448,7 +1448,7 @@ int pm_genpd_add_subdomain(struct generic_pm_domain *genpd,
goto out;
}
list_for_each_entry(link, &genpd->slave_links, slave_node) {
list_for_each_entry(link, &genpd->master_links, master_node) {
if (link->slave == subdomain && link->master == genpd) {
ret = -EINVAL;
goto out;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册