ab82cb5afa110048d383586e0c2b4d4cbc1d3688
[openwrt.git] / target / linux / rb532 / patches-2.6.27 / 016-korina_drop_left_over_assignment.patch
1 As the assigned value is being overwritten shortly after, it can be
2 dropped and so the whole variable definition moved to the start of the
3 function.
4
5 Signed-off-by: Phil Sutter <n0-1@freewrt.org>
6 ---
7  drivers/net/korina.c |    3 +--
8  1 files changed, 1 insertions(+), 2 deletions(-)
9
10 diff --git a/drivers/net/korina.c b/drivers/net/korina.c
11 index 60ae7bf..75010ca 100644
12 --- a/drivers/net/korina.c
13 +++ b/drivers/net/korina.c
14 @@ -743,6 +743,7 @@ static struct ethtool_ops netdev_ethtool_ops = {
15  static void korina_alloc_ring(struct net_device *dev)
16  {
17         struct korina_private *lp = netdev_priv(dev);
18 +       struct sk_buff *skb;
19         int i;
20  
21         /* Initialize the transmit descriptors */
22 @@ -758,8 +759,6 @@ static void korina_alloc_ring(struct net_device *dev)
23  
24         /* Initialize the receive descriptors */
25         for (i = 0; i < KORINA_NUM_RDS; i++) {
26 -               struct sk_buff *skb = lp->rx_skb[i];
27 -
28                 skb = dev_alloc_skb(KORINA_RBSIZE + 2);
29                 if (!skb)
30                         break;
31 -- 
32 1.5.6.4
33
34