cavium/liquidio: fix some error handling in lio_set_phys_id()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 24 Jun 2015 14:47:02 +0000 (17:47 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Jun 2015 09:13:03 +0000 (02:13 -0700)
There was a missing assignment so the "if (ret)" on the next line is
never true.

Fixes: f21fb3ed364b ('Add support of Cavium Liquidio ethernet adapters')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/liquidio/lio_ethtool.c

index 160f8077692ce487a7d8cb87aa41d62dc21c1ddc..29f33083178431ac3735094683663d1e4ab2b836 100644 (file)
@@ -434,8 +434,9 @@ static int lio_set_phys_id(struct net_device *netdev,
                        if (ret)
                                return ret;
 
-                       octnet_mdio45_access(lio, 1, LIO68XX_LED_BEACON_ADDR,
-                                            &lio->phy_beacon_val);
+                       ret = octnet_mdio45_access(lio, 1,
+                                                  LIO68XX_LED_BEACON_ADDR,
+                                                  &lio->phy_beacon_val);
                        if (ret)
                                return ret;