From: Russell King Date: Sun, 24 Feb 2013 10:56:59 +0000 (+0000) Subject: ARM: cleanup: OMAP hwmod error checking X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~51^2^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=857835c6d57aef101ac335a6da2149b54e7e0512;p=pandora-kernel.git 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 --- Reading git-diff-tree failed