From: Axel Lin Date: Mon, 28 Nov 2011 06:06:31 +0000 (+0800) Subject: regulator: aat2870: Fix the logic of checking if no id is matched in aat2870_get_regu... X-Git-Tag: v3.2-rc4~6^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4d6373c1109b11c8118340be97ae31b8f94d66a;p=pandora-kernel.git regulator: aat2870: Fix the logic of checking if no id is matched in aat2870_get_regulator In current implementation, the pointer ri is not NULL if no id is matched. Fix it by checking i == ARRAY_SIZE(aat2870_regulators) if no id is matched. Signed-off-by: Axel Lin Signed-off-by: Mark Brown Cc: stable@kernel.org --- Reading git-diff-tree failed