diff options
author | Daode Huang <huangdaode@huawei.com> | 2021-03-19 09:36:22 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-19 21:53:17 +0300 |
commit | c199fdb8abf558e330e3d13244b7c4593956329b (patch) | |
tree | 364f2219bf60d1ce482eb9058fb989fd72607809 /drivers/net/ethernet/huawei/hinic/hinic_rx.c | |
parent | a9d6df642dc8301ee7c3f414ec08548d5c4078ff (diff) | |
download | linux-c199fdb8abf558e330e3d13244b7c4593956329b.tar.xz |
net: hinic: Remove unnecessary 'out of memory' message
This patch removes unnecessary out of memory message in hinic driver,
fixes the following checkpatch.pl warning:
"WARNING: Possible unnecessary 'out of memory' message"
Signed-off-by: Daode Huang <huangdaode@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/huawei/hinic/hinic_rx.c')
-rw-r--r-- | drivers/net/ethernet/huawei/hinic/hinic_rx.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_rx.c b/drivers/net/ethernet/huawei/hinic/hinic_rx.c index 070a7cc6392e..cce08647b9b2 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_rx.c +++ b/drivers/net/ethernet/huawei/hinic/hinic_rx.c @@ -137,10 +137,8 @@ static struct sk_buff *rx_alloc_skb(struct hinic_rxq *rxq, int err; skb = netdev_alloc_skb_ip_align(rxq->netdev, rxq->rq->buf_sz); - if (!skb) { - netdev_err(rxq->netdev, "Failed to allocate Rx SKB\n"); + if (!skb) return NULL; - } addr = dma_map_single(&pdev->dev, skb->data, rxq->rq->buf_sz, DMA_FROM_DEVICE); @@ -212,10 +210,8 @@ static int rx_alloc_pkts(struct hinic_rxq *rxq) for (i = 0; i < free_wqebbs; i++) { skb = rx_alloc_skb(rxq, &dma_addr); - if (!skb) { - netdev_err(rxq->netdev, "Failed to alloc Rx skb\n"); + if (!skb) goto skb_out; - } hinic_set_sge(&sge, dma_addr, skb->len); |