From: David Binder Date: Thu, 12 May 2016 13:14:48 +0000 (-0400) Subject: staging: unisys: visornic: check for error instead of success X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=186896fdf0fd7d4617435986ed79f817eecd3c0f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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);