Commit 8b5081c8 authored by Benjamin Romer's avatar Benjamin Romer Committed by Greg Kroah-Hartman

staging: unisys: visornic: handle error return from device registration

There is no code to handle an error return in visornic, when it tries to
register with visorbus. This patch handles an error return from
visorbus_register_visor_driver() by dropping out of initialization.
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6155a3cf
......@@ -2131,8 +2131,9 @@ static int visornic_init(void)
if (!dev_num_pool)
goto cleanup_workqueue;
visorbus_register_visor_driver(&visornic_driver);
return 0;
err = visorbus_register_visor_driver(&visornic_driver);
if (!err)
return 0;
cleanup_workqueue:
if (visornic_timeout_reset_workqueue) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment