diff options
author | Peng Li <lipeng321@huawei.com> | 2021-05-24 17:47:14 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-05-25 00:07:38 +0300 |
commit | 87feef1cfbbe9233c53d5c4ff03277b70b58c458 (patch) | |
tree | d2c56750b4c26a0b36c8518d587e5c7d17ad0876 /drivers | |
parent | c3b6b5c64f394ce381ae7ce12060dd61768d9dd7 (diff) | |
download | linux-87feef1cfbbe9233c53d5c4ff03277b70b58c458.tar.xz |
net: wan: move out assignment in if condition
Should not use assignment in if condition.
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wan/wanxl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c index 7965c648f3eb..a5f0aae30e0c 100644 --- a/drivers/net/wan/wanxl.c +++ b/drivers/net/wan/wanxl.c @@ -404,7 +404,9 @@ static int wanxl_open(struct net_device *dev) netdev_err(dev, "port already open\n"); return -EIO; } - if ((i = hdlc_open(dev)) != 0) + + i = hdlc_open(dev); + if (i) return i; port->tx_in = port->tx_out = 0; @@ -730,7 +732,8 @@ static int wanxl_pci_init_one(struct pci_dev *pdev, timeout = jiffies + 5 * HZ; do { - if ((stat = readl(card->plx + PLX_MAILBOX_5)) != 0) + stat = readl(card->plx + PLX_MAILBOX_5); + if (stat) break; schedule(); } while (time_after(timeout, jiffies)); |