From: Russell King Date: Sun, 24 Feb 2013 10:55:24 +0000 (+0000) Subject: ARM: cleanup: pwrdm_can_ever_lose_context() checking X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=62f0f39b4aa2dce08f08797089e60d945448ca2b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index dea62a9aad07..36a69189b083 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c @@ -1054,7 +1054,7 @@ bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm) { int i; - if (IS_ERR_OR_NULL(pwrdm)) { + if (!pwrdm) { pr_debug("powerdomain: %s: invalid powerdomain pointer\n", __func__); return 1;