mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-05 00:04:34 -04:00
net: ethernet: ave: Remove unnecessary 'out of memory' message
Follow the warning from checkpatch.pl and remove 'out of memory' message.
WARNING: Possible unnecessary 'out of memory' message
#590: FILE: drivers/net/ethernet/socionext/sni_ave.c:590:
+ if (!skb) {
+ netdev_err(ndev, "can't allocate skb for Rx\n");
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20260109103915.2764380-1-hayashi.kunihiko@socionext.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
9da9633f2f
commit
11ed219588
@@ -586,10 +586,8 @@ static int ave_rxdesc_prepare(struct net_device *ndev, int entry)
|
||||
skb = priv->rx.desc[entry].skbs;
|
||||
if (!skb) {
|
||||
skb = netdev_alloc_skb(ndev, AVE_MAX_ETHFRAME);
|
||||
if (!skb) {
|
||||
netdev_err(ndev, "can't allocate skb for Rx\n");
|
||||
if (!skb)
|
||||
return -ENOMEM;
|
||||
}
|
||||
skb->data += AVE_FRAME_HEADROOM;
|
||||
skb->tail += AVE_FRAME_HEADROOM;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user