staging: lustre: lmv: drop trivially useless initialization
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 20 Jun 2015 19:07:51 +0000 (21:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jul 2015 02:37:04 +0000 (19:37 -0700)
Remove initialization of a variable that is immediately reassigned.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
type T;
identifier x;
constant C;
expression e;
@@

T x
- = C
 ;
x = e;
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/lmv/lmv_obd.c

index 5c058d0802dceaa5d5769ba87d12d52ec13cf181..c9e0536e9f2a18948b8c9b2aeed7418355cc0604 100644 (file)
@@ -1993,7 +1993,7 @@ static int lmv_setattr(struct obd_export *exp, struct md_op_data *op_data,
        struct obd_device       *obd = exp->exp_obd;
        struct lmv_obd    *lmv = &obd->u.lmv;
        struct lmv_tgt_desc     *tgt;
-       int                   rc = 0;
+       int                   rc;
 
        rc = lmv_check_connect(obd);
        if (rc)