From: Julia Lawall Date: Sun, 19 Aug 2012 08:44:19 +0000 (+0200) Subject: ab8500_charger: Fix error return code X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~5^2~52 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc2bc0c29a4e32da13ab75101edde030a6362d10;p=pandora-kernel.git ab8500_charger: Fix error return code Initialize return variable before exiting on an error path. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // Signed-off-by: Julia Lawall Signed-off-by: Anton Vorontsov --- Reading git-diff-tree failed