summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-01-15 16:07:13 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-05 14:37:18 +0200
commit992048f8ae84df92373e5424fd3fcc3748ac5d87 (patch)
tree4c7798c0646f764b164fbe53b046c09d69980bf8 /drivers/net
parentebfa83ab5a53a1a904c9b4196a43d5e2fc6dc13d (diff)
bgmac: Fix reversed test of build_skb() return value.
commit 750afbf8ee9c6a1c74a1fe5fc9852146b1d72687 upstream. Fixes: f1640c3ddeec ("bgmac: fix a missing check for build_skb") Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/broadcom/bgmac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bgmac.c b/drivers/net/ethernet/broadcom/bgmac.c
index b7e10e1b9131..20356755b708 100644
--- a/drivers/net/ethernet/broadcom/bgmac.c
+++ b/drivers/net/ethernet/broadcom/bgmac.c
@@ -469,7 +469,7 @@ static int bgmac_dma_rx_read(struct bgmac *bgmac, struct bgmac_dma_ring *ring,
len -= ETH_FCS_LEN;
skb = build_skb(buf, BGMAC_RX_ALLOC_SIZE);
- if (unlikely(skb)) {
+ if (unlikely(!skb)) {
bgmac_err(bgmac, "build_skb failed\n");
put_page(virt_to_head_page(buf));
break;