Skip to content

Commit 0ccc106

Browse files
Alexander Aringteigland
authored andcommitted
dlm: remove unnecessary error assign
This patch removes unnecessary error assigns to 0 at places we know that error is zero because it was checked on non-zero before. Signed-off-by: Alexander Aring <[email protected]> Signed-off-by: David Teigland <[email protected]>
1 parent 1689c16 commit 0ccc106

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

fs/dlm/lock.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,6 @@ static int find_rsb_dir(struct dlm_ls *ls, char *name, int len,
602602
*/
603603

604604
kref_get(&r->res_ref);
605-
error = 0;
606605
goto out_unlock;
607606

608607

@@ -1091,7 +1090,6 @@ int dlm_master_lookup(struct dlm_ls *ls, int from_nodeid, char *name, int len,
10911090
if (result)
10921091
*result = DLM_LU_ADD;
10931092
*r_nodeid = from_nodeid;
1094-
error = 0;
10951093
out_unlock:
10961094
spin_unlock(&ls->ls_rsbtbl[b].lock);
10971095
return error;
@@ -5747,7 +5745,6 @@ int dlm_recover_master_copy(struct dlm_ls *ls, struct dlm_rcom *rc)
57475745

57485746
attach_lkb(r, lkb);
57495747
add_lkb(r, lkb, rl->rl_status);
5750-
error = 0;
57515748
ls->ls_recover_locks_in++;
57525749

57535750
if (!list_empty(&r->res_waitqueue) || !list_empty(&r->res_convertqueue))

0 commit comments

Comments
 (0)