ipmi: make sure drivers were registered before unregistering them
ipmi: make sure drivers were registered before unregistering them

The ipmi code will never register a PCI or Open Firmware driver if a
hardcoded device is provided by the user by providing device addresses via
the module parameters.  This can cause us to attempt to unregister a
driver that was never registered, resulting in an oops.  Keep track of
registration in order to avoid this.

Fixes a post-2.6.34 regression.

Signed-off-by: Matthew Garrett <4cf8d479716eba9bc68e0146d95320fcb138b96b@redhat.com>
Acked-by: Corey Minyard <97c9634d4bed2779ee3e53c0495565ccc28c2363@mvista.com>
Signed-off-by: Andrew Morton <5c1e68b099950c134891f0b6e179498a8ebe9cf9@linux-foundation.org>
Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>

KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs