staging: vc-sm-cma: Don't fail if debugfs calls fail.
authorDave Stevenson <dave.stevenson@raspberrypi.org>
Fri, 8 Mar 2019 11:09:49 +0000 (11:09 +0000)
committerpopcornmix <popcornmix@gmail.com>
Mon, 13 May 2019 23:08:23 +0000 (00:08 +0100)
Return codes from debugfs calls should never alter the
flow of the main code.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
drivers/staging/vc04_services/vc-sm-cma/vc_sm.c

index c77d208..8ae7810 100644 (file)
@@ -681,13 +681,6 @@ static void vc_sm_connected_init(void)
 
        /* Create a debug fs directory entry (root). */
        sm_state->dir_root = debugfs_create_dir(VC_SM_DIR_ROOT_NAME, NULL);
-       if (!sm_state->dir_root) {
-               pr_err("[%s]: failed to create \'%s\' directory entry\n",
-                      __func__, VC_SM_DIR_ROOT_NAME);
-
-               ret = -EPERM;
-               goto err_stop_sm_service;
-       }
 
        sm_state->dir_state.show = &vc_sm_cma_global_state_show;
        sm_state->dir_state.dir_entry =
@@ -720,7 +713,6 @@ static void vc_sm_connected_init(void)
 
 err_remove_shared_memory:
        debugfs_remove_recursive(sm_state->dir_root);
-err_stop_sm_service:
        vc_sm_cma_vchi_stop(&sm_state->sm_handle);
 err_failed:
        pr_info("[%s]: failed, ret %d\n", __func__, ret);