diff options
author | Benjamin Romer <benjamin.romer@unisys.com> | 2015-09-04 12:01:33 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-13 09:43:41 -0700 |
commit | 8b5081c876bde9b1df5e96ee6990d5acd20c128b (patch) | |
tree | ae7c9c82f6a0e7584f075ca345df40b4c9339c6f /drivers/staging | |
parent | 6155a3cf11a6d4ed102ef5a30f655d4d2a38076b (diff) |
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: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/unisys/visornic/visornic_main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c index 7b08a8998a6d..9d3c1e282062 100644 --- a/drivers/staging/unisys/visornic/visornic_main.c +++ b/drivers/staging/unisys/visornic/visornic_main.c @@ -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) { |