diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2009-04-11 10:50:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-13 18:44:36 -0400 |
commit | 0ee904c35cc3fdd26a9c76077d9692d458309186 (patch) | |
tree | ce1dee044974b7c6040bbdb794747cd1baa8f6bb /drivers/net/fs_enet | |
parent | 710b523ac59426e8bfdea3533f42118e46b9cbfb (diff) |
drivers/net: replace BUG() with BUG_ON() if possible
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/fs_enet')
-rw-r--r-- | drivers/net/fs_enet/mii-fec.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c index 28077cc1b949..61aaae444b40 100644 --- a/drivers/net/fs_enet/mii-fec.c +++ b/drivers/net/fs_enet/mii-fec.c | |||
@@ -54,8 +54,7 @@ static int fs_enet_fec_mii_read(struct mii_bus *bus , int phy_id, int location) | |||
54 | fec_t __iomem *fecp = fec->fecp; | 54 | fec_t __iomem *fecp = fec->fecp; |
55 | int i, ret = -1; | 55 | int i, ret = -1; |
56 | 56 | ||
57 | if ((in_be32(&fecp->fec_r_cntrl) & FEC_RCNTRL_MII_MODE) == 0) | 57 | BUG_ON((in_be32(&fecp->fec_r_cntrl) & FEC_RCNTRL_MII_MODE) == 0); |
58 | BUG(); | ||
59 | 58 | ||
60 | /* Add PHY address to register command. */ | 59 | /* Add PHY address to register command. */ |
61 | out_be32(&fecp->fec_mii_data, (phy_id << 23) | mk_mii_read(location)); | 60 | out_be32(&fecp->fec_mii_data, (phy_id << 23) | mk_mii_read(location)); |
@@ -79,8 +78,7 @@ static int fs_enet_fec_mii_write(struct mii_bus *bus, int phy_id, int location, | |||
79 | int i; | 78 | int i; |
80 | 79 | ||
81 | /* this must never happen */ | 80 | /* this must never happen */ |
82 | if ((in_be32(&fecp->fec_r_cntrl) & FEC_RCNTRL_MII_MODE) == 0) | 81 | BUG_ON((in_be32(&fecp->fec_r_cntrl) & FEC_RCNTRL_MII_MODE) == 0); |
83 | BUG(); | ||
84 | 82 | ||
85 | /* Add PHY address to register command. */ | 83 | /* Add PHY address to register command. */ |
86 | out_be32(&fecp->fec_mii_data, (phy_id << 23) | mk_mii_write(location, val)); | 84 | out_be32(&fecp->fec_mii_data, (phy_id << 23) | mk_mii_write(location, val)); |