net: dpaa: fix maybe uninitialized var in dpaa_open()
authoryuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>
Wed, 1 Nov 2017 13:10:32 +0000 (21:10 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 2 Nov 2017 07:15:25 +0000 (16:15 +0900)
Signed-off-by: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c

index a8d0be824149603f5ca2a608ba84778ac9ac7b24..68f0ac129ba46e7bb8ce860900e25b7ecef375b7 100644 (file)
@@ -2468,7 +2468,8 @@ static int dpaa_open(struct net_device *net_dev)
        mac_dev = priv->mac_dev;
        dpaa_eth_napi_enable(priv);
 
-       if (dpaa_phy_init(net_dev))
+       err = dpaa_phy_init(net_dev);
+       if (err)
                goto phy_init_failed;
 
        for (i = 0; i < ARRAY_SIZE(mac_dev->port); i++) {