Skip to content

Commit

Permalink
PM / Domains: Fix link checking when add subdomain
Browse files Browse the repository at this point in the history
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: Huang Ying <ying.huang@intel.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
  • Loading branch information
Huang Ying authored and Rafael J. Wysocki committed May 11, 2012
1 parent 6ff7bb0 commit 4fcac10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/base/power/domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4fcac10

Please sign in to comment.