gemini: add 4.14 support
[openwrt/staging/chunkeey.git] / target / linux / gemini / patches-4.14 / 0904-net-cortina-fix-uninitialized-struct-member-usage.patch
1 --- a/drivers/net/ethernet/cortina/gemini.c
2 +++ b/drivers/net/ethernet/cortina/gemini.c
3 @@ -1013,9 +1013,9 @@ static int geth_resize_freeq(struct gemi
4 int ret;
5
6 if (netdev->dev_id == 0)
7 - other_netdev = geth->port1->netdev;
8 + other_netdev = (geth->port1)? geth->port1->netdev : NULL;
9 else
10 - other_netdev = geth->port0->netdev;
11 + other_netdev = (geth->port0)? geth->port0->netdev : NULL;
12
13 if (other_netdev && netif_running(other_netdev))
14 return -EBUSY;
15 @@ -2510,6 +2510,8 @@ static int gemini_ethernet_probe(struct
16 if (IS_ERR(geth->base))
17 return PTR_ERR(geth->base);
18 geth->dev = dev;
19 + geth->port0 = NULL;
20 + geth->port1 = NULL;
21
22 /* Wait for ports to stabilize */
23 do {