]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: ethernet: ave: Remove unnecessary 'out of memory' message
authorKunihiko Hayashi <hayashi.kunihiko@socionext.com>
Fri, 9 Jan 2026 10:39:15 +0000 (19:39 +0900)
committerJakub Kicinski <kuba@kernel.org>
Sat, 10 Jan 2026 20:03:18 +0000 (12:03 -0800)
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>
drivers/net/ethernet/socionext/sni_ave.c

index 66b3549636f8de844be7f473ae04d2fa319cb7b8..4700998c483742d8dc89bf705d2ea2d8b7629326 100644 (file)
@@ -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;
        }