From: Axel Lin Date: Sat, 29 Jun 2013 16:33:52 +0000 (+0800) Subject: regulator: max77693: Remove NULL test for rmatch[i].init_data X-Git-Tag: omap-for-v3.11/fixes-for-merge-window~26^2~11^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c7e7ddf31ca9943b70e58d1c47d059beda435bd;p=pandora-kernel.git regulator: max77693: Remove NULL test for rmatch[i].init_data The implementation in of_regulator_match() already ensures match->init_data is not NULL for all matched cases if the return value of of_regulator_match() > 0. Thus remove NULL test for rmatch[i].init_data. This patch also fixes the condition for loop iteration. The for loop should iterate "matched" times rather than ARRAY_SIZE(regulators) because we only allocate "matched" number of entries for rdata. Though in most cases, "matched" == ARRAY_SIZE(regulators). Signed-off-by: Axel Lin Acked-by: Jonghwa Lee Signed-off-by: Mark Brown --- Reading git-diff-tree failed