mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-24 15:56:49 +00:00
24 lines
696 B
Diff
24 lines
696 B
Diff
|
--- a/drivers/net/ethernet/cortina/gemini.c
|
||
|
+++ b/drivers/net/ethernet/cortina/gemini.c
|
||
|
@@ -1013,9 +1013,9 @@ static int geth_resize_freeq(struct gemi
|
||
|
int ret;
|
||
|
|
||
|
if (netdev->dev_id == 0)
|
||
|
- other_netdev = geth->port1->netdev;
|
||
|
+ other_netdev = (geth->port1)? geth->port1->netdev : NULL;
|
||
|
else
|
||
|
- other_netdev = geth->port0->netdev;
|
||
|
+ other_netdev = (geth->port0)? geth->port0->netdev : NULL;
|
||
|
|
||
|
if (other_netdev && netif_running(other_netdev))
|
||
|
return -EBUSY;
|
||
|
@@ -2510,6 +2510,8 @@ static int gemini_ethernet_probe(struct
|
||
|
if (IS_ERR(geth->base))
|
||
|
return PTR_ERR(geth->base);
|
||
|
geth->dev = dev;
|
||
|
+ geth->port0 = NULL;
|
||
|
+ geth->port1 = NULL;
|
||
|
|
||
|
/* Wait for ports to stabilize */
|
||
|
do {
|