From: Julia Lawall Date: Mon, 21 Jul 2008 07:58:30 +0000 (+0200) Subject: [SCSI] scsi_scan.c: Release mutex in error handling code X-Git-Tag: v2.6.27-rc1~55^2~17 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=773e82f6cdb026282ff7d26aaac291a5fa84ee3a;p=pandora-kernel.git [SCSI] scsi_scan.c: 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 that makes this change 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: James Bottomley --- Reading git-diff-tree failed