From 186896fdf0fd7d4617435986ed79f817eecd3c0f Mon Sep 17 00:00:00 2001 From: David Binder Date: Thu, 12 May 2016 09:14:48 -0400 Subject: [PATCH] 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 Signed-off-by: David Kershner Signed-off-by: Greg Kroah-Hartman --- drivers/staging/unisys/visornic/visornic_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c index f5561008e592..af81d3131cb7 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);