Skip to content

Commit 62f0f39

Browse files
author
Russell King
committed
ARM: cleanup: pwrdm_can_ever_lose_context() checking
pwrdm_can_ever_lose_context() is only ever called from the OMAP GPIO code, and only with a pointer returned from omap_hwmod_get_pwrdm(). omap_hwmod_get_pwrdm() only ever returns NULL on error, so using IS_ERR_OR_NULL() to validate the passed pointer is silly. Use a simpler !ptr check instead. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent d808aa6 commit 62f0f39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/mach-omap2/powerdomain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm)
10541054
{
10551055
int i;
10561056

1057-
if (IS_ERR_OR_NULL(pwrdm)) {
1057+
if (!pwrdm) {
10581058
pr_debug("powerdomain: %s: invalid powerdomain pointer\n",
10591059
__func__);
10601060
return 1;

0 commit comments

Comments
 (0)