Skip to content

Commit

Permalink
niu: Change niu_rbr_fill() to use unlikely() to check niu_rbr_add_pag…
Browse files Browse the repository at this point in the history
…e() return value

Change niu_rbr_fill() to use unlikely() to check niu_rbr_add_page() return
value to be consistent with the rest of the checks after niu_rbr_add_page()
calls in this file.

Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Shuah Khan authored and David S. Miller committed Jul 23, 2012
1 parent ec2deec commit 9b70749
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/sun/niu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3517,7 +3517,7 @@ static int niu_rbr_fill(struct niu *np, struct rx_ring_info *rp, gfp_t mask)
err = 0;
while (index < (rp->rbr_table_size - blocks_per_page)) {
err = niu_rbr_add_page(np, rp, mask, index);
if (err)
if (unlikely(err))
break;

index += blocks_per_page;
Expand Down

0 comments on commit 9b70749

Please sign in to comment.