]> git.baikalelectronics.ru Git - kernel.git/commit
macb: fix mdiobus_scan() error check
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Sat, 30 Apr 2016 22:47:36 +0000 (01:47 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 May 2016 19:03:09 +0000 (15:03 -0400)
commit0d9dbb1f58a9f832a512c9d84717119c41dc63a4
tree980a803e8bbc626b1a565b792b280c35d4621847
parent482b7e6284d2e7e4a65a92adda7ef2598ae03d03
macb: fix mdiobus_scan() error check

Now mdiobus_scan() returns ERR_PTR(-ENODEV) instead of NULL if the PHY
device ID was read as all ones. As this was not  an error before, this
value  should be filtered out now in this driver.

Fixes: b74766a0a0fe ("phylib: don't return NULL from get_phy_device()")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb.c