提交 88c9cc00 编写于 作者: M Mahati Chamarthy 提交者: Greg Kroah-Hartman

Staging: vt6656: Merges two lines of code and removes unused variable

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: NMahati Chamarthy <mahati.chamarthy@gmail.com>
Acked-by: NJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 fdeef1fe
......@@ -37,17 +37,14 @@
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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册