diff mbox

ocfs2: delete double assignment

Message ID 20140728152632.GA2926@himangi-Dell (mailing list archive)
State New, archived
Headers show

Commit Message

HIMANGI SARAOGI July 28, 2014, 3:26 p.m. UTC
Delete successive assignments to the same location. The two assignments are
simply identical.

A simplified version of Coccinelle semantic match that finds this problem is as
follows:

// <smpl>
@@
expression i;
@@

*i = ...;
 i = ...;
// </smpl>

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
---
Should the fist assignment be initializing the pv_minor field?
 fs/ocfs2/stack_user.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox

Patch

diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c
index 13a8537..4bcbb9b 100644
--- a/fs/ocfs2/stack_user.c
+++ b/fs/ocfs2/stack_user.c
@@ -591,7 +591,6 @@  static int ocfs2_control_release(struct inode *inode, struct file *file)
 		 */
 		ocfs2_control_this_node = -1;
 		running_proto.pv_major = 0;
-		running_proto.pv_major = 0;
 	}
 
 out: