Commit 3b9999ec authored by Rajbinder Brar's avatar Rajbinder Brar Committed by Greg Kroah-Hartman

Staging: vt6656: Merge two lines of code into one

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: default avatarRajbinder Brar <brar.rajbinder@gmail.com>
Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3e46587e
...@@ -623,7 +623,6 @@ int vnt_rf_write_embedded(struct vnt_private *priv, u32 data) ...@@ -623,7 +623,6 @@ int vnt_rf_write_embedded(struct vnt_private *priv, u32 data)
/* Set Tx power by rate and channel number */ /* Set Tx power by rate and channel number */
int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 channel) int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 channel)
{ {
int ret = true;
u8 power = priv->cck_pwr; u8 power = priv->cck_pwr;
if (channel == 0) if (channel == 0)
...@@ -653,9 +652,7 @@ int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 channel) ...@@ -653,9 +652,7 @@ int vnt_rf_setpower(struct vnt_private *priv, u32 rate, u32 channel)
break; break;
} }
ret = vnt_rf_set_txpower(priv, power, rate); return vnt_rf_set_txpower(priv, power, rate);
return ret;
} }
static u8 vnt_rf_addpower(struct vnt_private *priv) static u8 vnt_rf_addpower(struct vnt_private *priv)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment