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

Author: Mahati Chamarthy <mahati.chamarthy@gmail.com>

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 
Acked-by: Julia Lawall 
Signed-off-by: Greg Kroah-Hartman 
---
 drivers/staging/vt6656/key.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
 
diff --git a/drivers/staging/vt6656/key.c b/drivers/staging/vt6656/key.c
index 22f2961..181745d 100644
--- a/drivers/staging/vt6656/key.c
+++ b/drivers/staging/vt6656/key.c
@@ -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,
BtrLinux
Résumé de la politique de confidentialité

Ce site utilise des cookies afin que nous puissions vous fournir la meilleure expérience utilisateur possible. Les informations sur les cookies sont stockées dans votre navigateur et remplissent des fonctions telles que vous reconnaître lorsque vous revenez sur notre site Web et aider notre équipe à comprendre les sections du site que vous trouvez les plus intéressantes et utiles.