You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
freifunkist-firmware/target/linux/gemini/patches-4.14/0904-net-cortina-fix-uninit...

23 lines
696 B

--- 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 {