Changeset 34371


Ignore:
Timestamp:
2012-11-25T17:23:02+01:00 (5 years ago)
Author:
juhosg
Message:

AA: generic: ar8216: fix port number check in 'ar8xxx_mib_work_func'

Backport of r34283.

Also add a WARN_ON to 'ar8216_mib_fetch_port_stat'

Signed-off-by: Gabor Juhos <juhosg@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/attitude_adjustment/target/linux/generic/files/drivers/net/phy/ar8216.c

    r34370 r34371  
    426426        int i; 
    427427 
     428        WARN_ON(port >= priv->dev.ports); 
     429 
    428430        lockdep_assert_held(&priv->mib_lock); 
    429431 
     
    17111713next_port: 
    17121714        priv->mib_next_port++; 
    1713         if (priv->mib_next_port > priv->dev.ports) 
     1715        if (priv->mib_next_port >= priv->dev.ports) 
    17141716                priv->mib_next_port = 0; 
    17151717 
Note: See TracChangeset for help on using the changeset viewer.