From: Tilman Schmidt Date: Fri, 7 Mar 2008 18:47:08 +0000 (+0100) Subject: gigaset: fix Oops on module unload regression X-Git-Tag: v2.6.25-rc5~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d49c101a126808a38f2a1f4eedc1fd28233e37f;p=pandora-kernel.git gigaset: fix Oops on module unload regression The card state mutex was only initialized when a device was connected, but used during unload unconditionally, leading to an Oops if a driver was loaded and unloaded again without ever connecting a device. Fix this by initializing the mutex as soon as the structure is allocated. Also add a missing mutex unlock revealed in the same execution path. This fixes a possible Oops in 2.6.25-rc that was introduced by commit e468c04894f36045cf93d1384183a461014b6840 ("Gigaset: permit module unload"). Thanks to Roland Kletzing for reporting this problem. Signed-off-by: Tilman Schmidt Tested-by: Roland Kletzing Cc: Hansjoerg Lipp Cc: Karsten Keil Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed