diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-02-24 11:56:59 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-02-24 11:56:59 +0100 |
commit | 4d485661d799e81f98097057d445f4803cef2af0 (patch) | |
tree | 9ea63a8ac3b09bd4b41f422807a56081166fca19 /arch/arm/mach-omap2/board-omap3beagle.c | |
parent | ARM: cleanup: pwrdm_can_ever_lose_context() checking (diff) | |
download | linux-4d485661d799e81f98097057d445f4803cef2af0.tar.xz linux-4d485661d799e81f98097057d445f4803cef2af0.zip |
ARM: cleanup: OMAP hwmod error checking
omap_hwmod_lookup() only returns NULL on error, never an error pointer.
Checking the returned pointer using IS_ERR_OR_NULL() is needless
overhead. Use a simple !ptr check instead.
OMAP devices (oh->od) always have a valid platform device attached (see
omap_device_alloc()) so there's no point validating the platform device
pointer (we will have already oopsed long before if this is not the
case here.)
Lastly, oh->od is only ever NULL or a valid omap device pointer - 'oh'
comes from the statically declared hwmod tables, and the pointer is
only filled in by omap_device_alloc() at a point where the omap device
pointer must be valid.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3beagle.c')
0 files changed, 0 insertions, 0 deletions