From: Julia Lawall Date: Wed, 30 Jul 2008 05:33:28 +0000 (-0700) Subject: drivers/video: release mutex in error handling code X-Git-Tag: v2.6.27-rc2~186 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=950d442ad053e660538cdaa6efc0e060c2a65062;p=pandora-kernel.git drivers/video: release mutex in error handling code The mutex is released on a successful return, so it would seem that it should be released on an error return as well. The semantic patch finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ expression l; @@ mutex_lock(l); ... when != mutex_unlock(l) when any when strict ( if (...) { ... when != mutex_unlock(l) + mutex_unlock(l); return ...; } | mutex_unlock(l); ) // Signed-off-by: Julia Lawall Acked-by: Krzysztof Helt Acked-by: Ondrej Zajicek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed