]> git.karo-electronics.de Git - karo-tx-linux.git/commit
char/ipmi: fix OOPS caused by pnp_unregister_driver on unregistered driver
authorCorey Minyard <minyard@acm.org>
Thu, 10 Feb 2011 22:08:38 +0000 (16:08 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Feb 2011 22:47:22 +0000 (14:47 -0800)
commit71a18194814f64021ec3dfc5a9b07d0eee2a1583
treef886fecfcd2688259429cdd69ea27c3b87399e6a
parent91bbb90c3b953b03fae72a22ae7a0713a48b3dba
char/ipmi: fix OOPS caused by pnp_unregister_driver on unregistered driver

commit d2478521afc20227658a10a8c5c2bf1a2aa615b3 upstream.

This patch fixes an OOPS triggered when calling modprobe ipmi_si a
second time after the first modprobe returned without finding any ipmi
devices.  This can happen if you reload the module after having the
first module load fail.  The driver was not deregistering from PNP in
that case.

Peter Huewe originally reported this patch and supplied a fix, I have a
different patch based on Linus' suggestion that cleans things up a bit
more.

Cc: openipmi-developer@lists.sourceforge.net
Reviewed-by: Peter Huewe <peterhuewe@gmx.de>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/ipmi/ipmi_si_intf.c