Tilman Schmidt 5d49c101a1 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 <tilman@imap.cc>
Tested-by: Roland Kletzing <devzero@web.de>
Cc: Hansjoerg Lipp <hjlipp@web.de>
Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-07 11:06:08 -08:00
..
2008-02-06 10:41:12 -08:00
2008-02-06 10:41:12 -08:00
2008-02-06 10:41:12 -08:00
2008-02-06 10:41:12 -08:00
2007-10-16 09:43:10 -07:00
2008-02-06 10:41:12 -08:00
2008-02-06 10:41:12 -08:00
2007-07-21 17:49:17 -07:00
2007-10-16 09:43:10 -07:00
2008-02-06 10:41:12 -08:00