945546d6dfc68846c0257620fb8f9fbab49603c7
[openwrt/staging/jow.git] /
1 From b9f63ae7ba2de2ba19137c5757c0607ce40f3ed5 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Wed, 17 Aug 2016 15:37:14 +0200
4 Subject: [PATCH] net: bgmac: fix reversed check for MII registration error
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 It was failing on successful registration returning meaningless errors.
10
11 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
12 Fixes: 55954f3bfdac ("net: ethernet: bgmac: move BCMA MDIO Phy code into a separate file")
13 Signed-off-by: David S. Miller <davem@davemloft.net>
14 ---
15 drivers/net/ethernet/broadcom/bgmac-bcma.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18 --- a/drivers/net/ethernet/broadcom/bgmac-bcma.c
19 +++ b/drivers/net/ethernet/broadcom/bgmac-bcma.c
20 @@ -159,7 +159,7 @@ static int bgmac_probe(struct bcma_devic
21
22 if (!bgmac_is_bcm4707_family(core)) {
23 mii_bus = bcma_mdio_mii_register(core, bgmac->phyaddr);
24 - if (!IS_ERR(mii_bus)) {
25 + if (IS_ERR(mii_bus)) {
26 err = PTR_ERR(mii_bus);
27 goto err;
28 }