Skip to content

Commit

Permalink
net/can/mscan: drop assignment in while-construct
Browse files Browse the repository at this point in the history
As suggested by Wolfgang Grandegger.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wolfram Sang authored and David S. Miller committed Nov 17, 2009
1 parent 1712fe5 commit 68bd742
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/can/mscan/mscan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 68bd742

Please sign in to comment.