Skip to content
  • Tilman Schmidt's avatar
    gigaset: fix Oops on module unload regression · 5d49c101
    Tilman Schmidt authored
    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
    e468c048
    
     ("Gigaset: permit module
    unload").
    
    Thanks to Roland Kletzing for reporting this problem.
    
    Signed-off-by: default avatarTilman Schmidt <tilman@imap.cc>
    Tested-by: default avatarRoland Kletzing <devzero@web.de>
    Cc: Hansjoerg Lipp <hjlipp@web.de>
    Cc: Karsten Keil <kkeil@suse.de>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    5d49c101