From: Julia Lawall Date: Mon, 21 Jul 2008 09:29:34 +0000 (+0200) Subject: b43legacy: Release mutex in error handling code X-Git-Tag: v2.6.27-rc2~119^2~6^2~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4104863fb4a724723d1d5f3cba9d3c5084087e45;p=pandora-kernel.git b43legacy: 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 Signed-off-by: Michael Buesch Cc: stable Signed-off-by: John W. Linville --- Reading git-diff-tree failed