From a35c52b71580a1fb29df11270b1461f6d17f5670 Mon Sep 17 00:00:00 2001 From: yuan linyu Date: Wed, 1 Nov 2017 21:10:32 +0800 Subject: [PATCH] net: dpaa: fix maybe uninitialized var in dpaa_open() Signed-off-by: yuan linyu Signed-off-by: David S. Miller --- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c index a8d0be8..68f0ac1 100644 --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c @@ -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++) { -- 2.7.4