diff options
author | David Binder <david.binder@unisys.com> | 2016-05-12 13:14:48 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-08 05:55:19 (GMT) |
commit | 186896fdf0fd7d4617435986ed79f817eecd3c0f (patch) | |
tree | 7428907d32ae5c338581eefcb7b24e63185758f7 /drivers/staging/unisys | |
parent | ab2c3d75451819b4d28ec6dececd299ac03d39ec (diff) | |
download | linux-186896fdf0fd7d4617435986ed79f817eecd3c0f.tar.xz |
staging: unisys: visornic: check for error instead of success
Changes the conditional logic to check for an error code instead
of a success code.
Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r-- | drivers/staging/unisys/visornic/visornic_main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c index f556100..af81d31 100644 --- a/drivers/staging/unisys/visornic/visornic_main.c +++ b/drivers/staging/unisys/visornic/visornic_main.c @@ -2091,8 +2091,10 @@ static int visornic_init(void) goto cleanup_debugfs; err = visorbus_register_visor_driver(&visornic_driver); - if (!err) - return 0; + if (err) + goto cleanup_debugfs; + + return 0; cleanup_debugfs: debugfs_remove_recursive(visornic_debugfs_dir); |