diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-02-10 13:05:12 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2013-02-10 13:05:12 +0000 |
commit | 4720c75cf769d40fd03e96d8c565c68895a2f4f7 (patch) | |
tree | 1d29ed2e56bf8e600d2124c704f7873e0cd54392 /target/linux/generic/files | |
parent | f07a33afc2d7ad6863282e627e157f1290978460 (diff) | |
download | mtk-20170518-4720c75cf769d40fd03e96d8c565c68895a2f4f7.zip mtk-20170518-4720c75cf769d40fd03e96d8c565c68895a2f4f7.tar.gz mtk-20170518-4720c75cf769d40fd03e96d8c565c68895a2f4f7.tar.bz2 |
generic: ar8216: skip probe on unused PHY addresses
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 35536
Diffstat (limited to 'target/linux/generic/files')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/ar8216.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index 4547f7c..45b2bd7 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -1962,6 +1962,10 @@ ar8216_probe(struct phy_device *pdev) struct ar8216_priv *priv; int ret; + /* skip PHYs at unused adresses */ + if (pdev->addr != 0 && pdev->addr != 4) + return -ENODEV; + priv = kzalloc(sizeof(struct ar8216_priv), GFP_KERNEL); if (priv == NULL) return -ENOMEM; |