From: Cai Zhiyong Date: Mon, 18 Nov 2013 12:21:49 +0000 (+0800) Subject: regmap: Fix 'ret' would return an uninitialized value X-Git-Tag: v3.14-rc1~93^2~1^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd60e381fab88979c3312265d18bb635c314d242;p=pandora-kernel.git regmap: Fix 'ret' would return an uninitialized value This patch give a warning when calling regmap_register_patch with parameter num_regs <= 0. When the num_regs parameter is zero and krealloc doesn't fail, then the code would return an uninitialized value. However, calling this function with num_regs == 0, would be a waste as it essentially does nothing. Signed-off-by: Cai Zhiyong Reviewed-by: Geyslan G. Bem Signed-off-by: Mark Brown --- Reading git-diff-tree failed