]> git.ipfire.org Git - thirdparty/kernel/stable.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 23:14:49 +0000 (15:14 -0800)
commita7c9851a1070ca85e13672c999eb36c59924263e
treea58c7fd906600267c98cef9c1330fc6d9f0eb520
parentc2e884b07e6f182a66514e21eebe9260dfa20a4e
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