summaryrefslogtreecommitdiff
path: root/drivers/staging/et131x
diff options
context:
space:
mode:
authorZhao, Gang <gamerh2o@gmail.com>2014-02-06 00:10:34 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-07 10:38:41 -0800
commita863a15bf24ae025ec8c3d6b23600fd6cdd94edf (patch)
treed52e3660541a9c9dfde88952320b57fd3686879b /drivers/staging/et131x
parentba92b22515e1230661cab7ba2a025910c0636c15 (diff)
staging: et131x: stop read when hit max delay in et131x_phy_mii_read
stop read and return error when hit max delay time. Signed-off-by: Zhao, Gang <gamerh2o@gmail.com> Acked-by: Mark Einon <mark.einon@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/et131x')
-rw-r--r--drivers/staging/et131x/et131x.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
index e516bb69f3b4..cf970495efc9 100644
--- a/drivers/staging/et131x/et131x.c
+++ b/drivers/staging/et131x/et131x.c
@@ -1388,6 +1388,7 @@ static int et131x_phy_mii_read(struct et131x_adapter *adapter, u8 addr,
mii_indicator);
status = -EIO;
+ goto out;
}
/* If we hit here we were able to read the register and we need to
@@ -1395,6 +1396,7 @@ static int et131x_phy_mii_read(struct et131x_adapter *adapter, u8 addr,
*/
*value = readl(&mac->mii_mgmt_stat) & ET_MAC_MIIMGMT_STAT_PHYCRTL_MASK;
+out:
/* Stop the read operation */
writel(0, &mac->mii_mgmt_cmd);