[PATCH] cpqphp: fix oops during unload without probe

drivers/pci/hotplug/cpqphp_core.c calls cpqphp_event_start_thread()
in one_time_init(), which is called whenever the hardware is probed.
Unfortunately, cpqphp_event_stop_thread() is *always* called when
the module is unloaded. If the hardware is never probed, then
cpqphp_event_stop_thread() tries to manipulate a couple of
uninitialized mutexes.

Signed-off-by: Keith Moore <keithmo@exmsft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by Keith Moore and committed by Greg Kroah-Hartman 4002307d 70549ad9

+3 -2
+3 -2
drivers/pci/hotplug/cpqphp_core.c
··· 60 static void __iomem *cpqhp_rom_start; 61 static int power_mode; 62 static int debug; 63 64 #define DRIVER_VERSION "0.9.8" 65 #define DRIVER_AUTHOR "Dan Zink <dan.zink@compaq.com>, Greg Kroah-Hartman <greg@kroah.com>" ··· 1272 { 1273 int loop; 1274 int retval = 0; 1275 - static int initialized = 0; 1276 1277 if (initialized) 1278 return 0; ··· 1441 } 1442 1443 // Stop the notification mechanism 1444 - cpqhp_event_stop_thread(); 1445 1446 //unmap the rom address 1447 if (cpqhp_rom_start)
··· 60 static void __iomem *cpqhp_rom_start; 61 static int power_mode; 62 static int debug; 63 + static int initialized; 64 65 #define DRIVER_VERSION "0.9.8" 66 #define DRIVER_AUTHOR "Dan Zink <dan.zink@compaq.com>, Greg Kroah-Hartman <greg@kroah.com>" ··· 1271 { 1272 int loop; 1273 int retval = 0; 1274 1275 if (initialized) 1276 return 0; ··· 1441 } 1442 1443 // Stop the notification mechanism 1444 + if (initialized) 1445 + cpqhp_event_stop_thread(); 1446 1447 //unmap the rom address 1448 if (cpqhp_rom_start)