From: Julia Lawall Date: Wed, 4 Aug 2010 19:54:26 +0000 (+0200) Subject: drivers/staging/iio: call mutex_unlock in error handling code X-Git-Tag: v2.6.37-rc1~60^2~3^2~801 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1ae4da731a6e049a675097ebfd9a02b9b50530e;p=pandora-kernel.git drivers/staging/iio: call mutex_unlock in error handling code Adjust the error handling code so that it benefits from the call to mutex_unlock at the end of the function. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @rcu exists@ position p1; expression E; @@ mutex_lock@p1(E); ... mutex_unlock(E); @exists@ position rcu.p1; expression E; @@ *mutex_lock@p1(E); ... when != mutex_unlock(E); ?*return ...; // Signed-off-by: Julia Lawall Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed