• Russell King's avatar
    ARM: cleanup: OMAP hwmod error checking · 857835c6
    Russell King authored
    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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
omap_device.c 35.6 KB