提交 68bd7422 编写于 作者: W Wolfram Sang 提交者: David S. Miller

net/can/mscan: drop assignment in while-construct

As suggested by Wolfgang Grandegger.
Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1712fe59
......@@ -379,8 +379,10 @@ static int mscan_rx_poll(struct napi_struct *napi, int quota)
struct can_frame *frame;
u8 canrflg;
while (npackets < quota && ((canrflg = in_8(&regs->canrflg)) &
(MSCAN_RXF | MSCAN_ERR_IF))) {
while (npackets < quota) {
canrflg = in_8(&regs->canrflg);
if (!(canrflg & (MSCAN_RXF | MSCAN_ERR_IF)))
break;
skb = alloc_can_skb(dev, &frame);
if (!skb) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册