net/can/mscan: drop assignment in while-construct
authorWolfram Sang <w.sang@pengutronix.de>
Mon, 16 Nov 2009 12:57:49 +0000 (12:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 Nov 2009 11:54:02 +0000 (03:54 -0800)
As suggested by Wolfgang Grandegger.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/can/mscan/mscan.c

index 76e413e7fdb18f1ce30e0f461329d397692861c0..20d1991b90948853e811338a41424435667dd6ec 100644 (file)
@@ -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) {