dlm: NULL check before some freeing functions is not needed
authorThomas Meyer <thomas@m3y3r.de>
Mon, 3 Dec 2018 16:02:01 +0000 (10:02 -0600)
committerDavid Teigland <teigland@redhat.com>
Mon, 3 Dec 2018 16:02:01 +0000 (10:02 -0600)
NULL check before some freeing functions is not needed.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lockspace.c

index a0584bc..db43b98 100644 (file)
@@ -681,10 +681,8 @@ static int new_lockspace(const char *name, const char *cluster,
  out_lkbidr:
        idr_destroy(&ls->ls_lkbidr);
  out_rsbtbl:
-       for (i = 0; i < DLM_REMOVE_NAMES_MAX; i++) {
-               if (ls->ls_remove_names[i])
-                       kfree(ls->ls_remove_names[i]);
-       }
+       for (i = 0; i < DLM_REMOVE_NAMES_MAX; i++)
+               kfree(ls->ls_remove_names[i]);
        vfree(ls->ls_rsbtbl);
  out_lsfree:
        if (do_unreg)