Skip to content

Commit 992048f

Browse files
davem330gregkh
authored andcommitted
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>
1 parent ebfa83a commit 992048f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/net/ethernet/broadcom

drivers/net/ethernet/broadcom/bgmac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ static int bgmac_dma_rx_read(struct bgmac *bgmac, struct bgmac_dma_ring *ring,
469469
len -= ETH_FCS_LEN;
470470

471471
skb = build_skb(buf, BGMAC_RX_ALLOC_SIZE);
472-
if (unlikely(skb)) {
472+
if (unlikely(!skb)) {
473473
bgmac_err(bgmac, "build_skb failed\n");
474474
put_page(virt_to_head_page(buf));
475475
break;

0 commit comments

Comments
 (0)