Skip to content

Commit

Permalink
[ARM] omap: ensure that failing power domain lookups produce errors
Browse files Browse the repository at this point in the history
Use pr_err() for errors rather than pr_debug().  pr_debug() are
compiled away unless -DDEBUG is used.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King authored and Russell King committed Feb 23, 2009
1 parent 7eb1afc commit 7aec53a
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions arch/arm/mach-omap2/clockdomain.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,11 @@ static void _autodep_lookup(struct clkdm_pwrdm_autodep *autodep)

pwrdm = pwrdm_lookup(autodep->pwrdm.name);
if (!pwrdm) {
pr_debug("clockdomain: _autodep_lookup: powerdomain %s "
"does not exist\n", autodep->pwrdm.name);
WARN_ON(1);
pr_err("clockdomain: autodeps: powerdomain %s does not exist\n",
autodep->pwrdm.name);
pwrdm = ERR_PTR(-ENOENT);
}
autodep->pwrdm.ptr = pwrdm;

return;
}

/*
Expand Down Expand Up @@ -211,8 +208,8 @@ int clkdm_register(struct clockdomain *clkdm)

pwrdm = pwrdm_lookup(clkdm->pwrdm.name);
if (!pwrdm) {
pr_debug("clockdomain: clkdm_register %s: powerdomain %s "
"does not exist\n", clkdm->name, clkdm->pwrdm.name);
pr_err("clockdomain: %s: powerdomain %s does not exist\n",
clkdm->name, clkdm->pwrdm.name);
return -EINVAL;
}
clkdm->pwrdm.ptr = pwrdm;
Expand All @@ -222,7 +219,7 @@ int clkdm_register(struct clockdomain *clkdm)
if (_clkdm_lookup(clkdm->name)) {
ret = -EEXIST;
goto cr_unlock;
};
}

list_add(&clkdm->node, &clkdm_list);

Expand Down

0 comments on commit 7aec53a

Please sign in to comment.