aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/rb532/patches-2.6.27/016-korina_drop_left_over_assignment.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/rb532/patches-2.6.27/016-korina_drop_left_over_assignment.patch')
-rw-r--r--target/linux/rb532/patches-2.6.27/016-korina_drop_left_over_assignment.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/target/linux/rb532/patches-2.6.27/016-korina_drop_left_over_assignment.patch b/target/linux/rb532/patches-2.6.27/016-korina_drop_left_over_assignment.patch
new file mode 100644
index 0000000000..ab82cb5afa
--- /dev/null
+++ b/target/linux/rb532/patches-2.6.27/016-korina_drop_left_over_assignment.patch
@@ -0,0 +1,34 @@
+As the assigned value is being overwritten shortly after, it can be
+dropped and so the whole variable definition moved to the start of the
+function.
+
+Signed-off-by: Phil Sutter <n0-1@freewrt.org>
+---
+ drivers/net/korina.c | 3 +--
+ 1 files changed, 1 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/korina.c b/drivers/net/korina.c
+index 60ae7bf..75010ca 100644
+--- a/drivers/net/korina.c
++++ b/drivers/net/korina.c
+@@ -743,6 +743,7 @@ static struct ethtool_ops netdev_ethtool_ops = {
+ static void korina_alloc_ring(struct net_device *dev)
+ {
+ struct korina_private *lp = netdev_priv(dev);
++ struct sk_buff *skb;
+ int i;
+
+ /* Initialize the transmit descriptors */
+@@ -758,8 +759,6 @@ static void korina_alloc_ring(struct net_device *dev)
+
+ /* Initialize the receive descriptors */
+ for (i = 0; i < KORINA_NUM_RDS; i++) {
+- struct sk_buff *skb = lp->rx_skb[i];
+-
+ skb = dev_alloc_skb(KORINA_RBSIZE + 2);
+ if (!skb)
+ break;
+--
+1.5.6.4
+
+