Commit 87feef1c authored by Peng Li's avatar Peng Li Committed by David S. Miller

net: wan: move out assignment in if condition

Should not use assignment in if condition.
Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c3b6b5c6
...@@ -404,7 +404,9 @@ static int wanxl_open(struct net_device *dev) ...@@ -404,7 +404,9 @@ static int wanxl_open(struct net_device *dev)
netdev_err(dev, "port already open\n"); netdev_err(dev, "port already open\n");
return -EIO; return -EIO;
} }
if ((i = hdlc_open(dev)) != 0)
i = hdlc_open(dev);
if (i)
return i; return i;
port->tx_in = port->tx_out = 0; port->tx_in = port->tx_out = 0;
...@@ -730,7 +732,8 @@ static int wanxl_pci_init_one(struct pci_dev *pdev, ...@@ -730,7 +732,8 @@ static int wanxl_pci_init_one(struct pci_dev *pdev,
timeout = jiffies + 5 * HZ; timeout = jiffies + 5 * HZ;
do { do {
if ((stat = readl(card->plx + PLX_MAILBOX_5)) != 0) stat = readl(card->plx + PLX_MAILBOX_5);
if (stat)
break; break;
schedule(); schedule();
} while (time_after(timeout, jiffies)); } while (time_after(timeout, jiffies));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment