]> git.baikalelectronics.ru Git - kernel.git/commit
staging: unisys: stop device registration before visorbus registration
authorBenjamin Romer <benjamin.romer@unisys.com>
Fri, 4 Sep 2015 16:01:32 +0000 (12:01 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 16:43:41 +0000 (09:43 -0700)
commit6327fd716a4fffce2540cc8d71ff0cea1b16d3d9
tree86c904abaec2fb61d9135dcf797eea9332a64648
parent4a4c4609b6c5c35e6d4ea29e1e70cf0fa034c417
staging: unisys: stop device registration before visorbus registration

In cases where visorbus is compiled directly into the kernel, if
visorbus registration fails for any reason, it is still possible for
other drivers to call visorbus_register_visor_driver(), which could
cause an oops. Prevent this by saving the result of the call to
create_bus() in a static variable, and return an error code when the bus
hasn't been registered successfully.

Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorbus/visorbus_main.c