From 3456880ff39f7606866b5852fd71ef6663200c0d Mon Sep 17 00:00:00 2001 From: Thomas Meyer Date: Mon, 3 Dec 2018 10:02:01 -0600 Subject: dlm: NULL check before some freeing functions is not needed NULL check before some freeing functions is not needed. Signed-off-by: Thomas Meyer Signed-off-by: David Teigland --- fs/dlm/lockspace.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'fs/dlm/lockspace.c') diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c index a0584bc5209a..db43b98c4d64 100644 --- a/fs/dlm/lockspace.c +++ b/fs/dlm/lockspace.c @@ -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) -- cgit v1.2.3