eebcded6fa8937398063b2e0b916f7cbf4056012
[openwrt/staging/aparcar.git] /
1 From 750afbf8ee9c6a1c74a1fe5fc9852146b1d72687 Mon Sep 17 00:00:00 2001
2 From: "David S. Miller" <davem@davemloft.net>
3 Date: Fri, 15 Jan 2016 16:07:13 -0500
4 Subject: [PATCH] bgmac: Fix reversed test of build_skb() return value.
5
6 Fixes: f1640c3ddeec ("bgmac: fix a missing check for build_skb")
7 Signed-off-by: David S. Miller <davem@davemloft.net>
8 ---
9 drivers/net/ethernet/broadcom/bgmac.c | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12 --- a/drivers/net/ethernet/broadcom/bgmac.c
13 +++ b/drivers/net/ethernet/broadcom/bgmac.c
14 @@ -469,7 +469,7 @@ static int bgmac_dma_rx_read(struct bgma
15 len -= ETH_FCS_LEN;
16
17 skb = build_skb(buf, BGMAC_RX_ALLOC_SIZE);
18 - if (unlikely(skb)) {
19 + if (unlikely(!skb)) {
20 bgmac_err(bgmac, "build_skb failed\n");
21 put_page(virt_to_head_page(buf));
22 break;