From 6781b90f89b427ec9445c43f8102ebe0a4330e54 Mon Sep 17 00:00:00 2001 From: Andrew Goodbody Date: Tue, 5 Aug 2025 15:18:17 +0100 Subject: [PATCH] net: mvpp2: Return -ENOMEM for failed alloc Instead of returning -1 on a failed alloc, return -ENOMEM. This issue was found by Smatch. Signed-off-by: Andrew Goodbody --- drivers/net/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c index c0328345973..b68d305a0dc 100644 --- a/drivers/net/mvpp2.c +++ b/drivers/net/mvpp2.c @@ -2329,7 +2329,7 @@ static int mvpp2_prs_mac_da_accept(struct mvpp2 *priv, int port, pe = kzalloc(sizeof(*pe), GFP_KERNEL); if (!pe) - return -1; + return -ENOMEM; mvpp2_prs_tcam_lu_set(pe, MVPP2_PRS_LU_MAC); pe->index = tid; -- 2.47.2