From: Laxman Dewangan Date: Fri, 15 Mar 2013 05:34:08 +0000 (+0000) Subject: i2c: tegra: check the clk_prepare_enable() return value X-Git-Tag: v3.2.42~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e52ca26060bbe254ea3f8d7b31ecc998e085ec02;p=pandora-kernel.git i2c: tegra: check the clk_prepare_enable() return value commit 132c803f7b70b17322579f6f4f3f65cf68e55135 upstream. NVIDIA's Tegra SoC allows read/write of controller register only if controller clock is enabled. System hangs if read/write happens to registers without enabling clock. clk_prepare_enable() can be fail due to unknown reason and hence adding check for return value of this function. If this function success then only access register otherwise return to caller with error. Signed-off-by: Laxman Dewangan Reviewed-by: Stephen Warren Signed-off-by: Wolfram Sang [bwh: Backported to 3.2: - Adjust context - Keep calling clk_enable() directly] Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed