summaryrefslogtreecommitdiff
path: root/drivers/net/mvpp2.c
diff options
context:
space:
mode:
authorAndrew Goodbody <andrew.goodbody@linaro.org>2025-08-05 15:18:17 +0100
committerJerome Forissier <jerome.forissier@linaro.org>2025-08-18 15:47:57 +0200
commit6781b90f89b427ec9445c43f8102ebe0a4330e54 (patch)
tree0853c2b60a4f8a180eefad0f256ed35c1f17397a /drivers/net/mvpp2.c
parentb24c89affd9063c3f9f3ca99db075bd3bb1fc4b2 (diff)
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 <andrew.goodbody@linaro.org>
Diffstat (limited to 'drivers/net/mvpp2.c')
-rw-r--r--drivers/net/mvpp2.c2
1 files changed, 1 insertions, 1 deletions
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;