]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
Staging: vt6656: Merges two lines of code and removes unused variable
authorMahati Chamarthy <mahati.chamarthy@gmail.com>
Sun, 21 Sep 2014 15:23:52 +0000 (20:53 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Sep 2014 20:40:17 +0000 (13:40 -0700)
This patch merges an assignment with an immediately following return of
the assigned variable.The following Coccinelle semantic patch was used to make this transformation:

@@
expression ret;
identifier f;
@@

-ret =
+return
     f(...);
-return ret;

A variable that became unused due to this transformation was also removed.

Signed-off-by: Mahati Chamarthy <mahati.chamarthy@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/key.c

index 22f2961d222548975dcecb4e66c0d4f421410e22..181745d8e250048879629f627ef888d50f886026 100644 (file)
 
 int vnt_key_init_table(struct vnt_private *priv)
 {
-       int ret;
        u8 i;
        u8 data[MAX_KEY_TABLE];
 
        for (i = 0; i < MAX_KEY_TABLE; i++)
                data[i] = i;
 
-       ret = vnt_control_out(priv, MESSAGE_TYPE_CLRKEYENTRY,
+       return vnt_control_out(priv, MESSAGE_TYPE_CLRKEYENTRY,
                        0, 0, ARRAY_SIZE(data), data);
-
-       return ret;
 }
 
 static int vnt_set_keymode(struct ieee80211_hw *hw, u8 *mac_addr,