diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-02-24 10:55:24 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-02-24 10:55:24 +0000 |
commit | 62f0f39b4aa2dce08f08797089e60d945448ca2b (patch) | |
tree | 844df7ee10b684211400b9f7889b7a963e5d2df3 /arch/arm/mach-omap2/powerdomain.c | |
parent | d808aa69a7e85dea850ffe7b3d076be696da35be (diff) | |
download | op-kernel-dev-62f0f39b4aa2dce08f08797089e60d945448ca2b.zip op-kernel-dev-62f0f39b4aa2dce08f08797089e60d945448ca2b.tar.gz |
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>
Diffstat (limited to 'arch/arm/mach-omap2/powerdomain.c')
-rw-r--r-- | arch/arm/mach-omap2/powerdomain.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index dea62a9..36a6918 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; |