summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sun/niu.c
diff options
context:
space:
mode:
authorShuah Khan <shuah.khan@hp.com>2012-07-20 17:34:32 +0400
committerDavid S. Miller <davem@davemloft.net>2012-07-23 10:31:07 +0400
commit9b70749e64132e17ab02239b82fcb4a2c55554d1 (patch)
treed384371c9582aa78468276e4864b46414a1844f4 /drivers/net/ethernet/sun/niu.c
parentec2deec1f3520c467e3fb64f11a5d1e9c073e376 (diff)
downloadlinux-9b70749e64132e17ab02239b82fcb4a2c55554d1.tar.xz
niu: Change niu_rbr_fill() to use unlikely() to check niu_rbr_add_page() 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>
Diffstat (limited to 'drivers/net/ethernet/sun/niu.c')
-rw-r--r--drivers/net/ethernet/sun/niu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c
index 60d5c035d946..c2a0fe393267 100644
--- a/drivers/net/ethernet/sun/niu.c
+++ b/drivers/net/ethernet/sun/niu.c
@@ -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;