From: Julia Lawall Date: Tue, 7 Jun 2011 01:59:02 +0000 (-0700) Subject: [CPUFREQ] s5pv210-cpufreq.c: Add missing clk_put X-Git-Tag: v3.1-rc1~254^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4911ca1031c2ade225fdf22cc872bc121c2c2ec5;p=pandora-kernel.git [CPUFREQ] s5pv210-cpufreq.c: Add missing clk_put The successive calls to clk_get each call clk_put in the case of failure, but this is not done for subsequent error handling code. The calls to clk_get are moved to the end of the function, and appropriate gotos are added. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ expression e1,e2; statement S; @@ e1 = clk_get@p1(...); ... when != e1 = e2 when != clk_put(e1) when any if (...) { ... when != clk_put(e1) when != if (...) { ... clk_put(e1) ... } * return@p3 ...; } else S // Signed-off-by: Julia Lawall Signed-off-by: Kukjin Kim Signed-off-by: Dave Jones --- Reading git-diff-tree failed