From 41fcdc111a04c1ebb637d04f9221864253e84c3f Mon Sep 17 00:00:00 2001 From: Ivan Malov Date: Thu, 10 Aug 2023 21:36:14 +0400 Subject: [PATCH] net/sfc: add missing error code indication to MAE init path [ upstream commit 1f5e6bb633cafc2789ec74e80bf90fa54ef5b788 ] A failure to allocate a bounce buffer for encap. header parsing results in falling to the error path but does not set an appropriate error code. Fix this. Fixes: 1bbd1ec2348a ("net/sfc: support action VXLAN encap in MAE backend") Signed-off-by: Ivan Malov Reviewed-by: Andy Moreton Acked-by: Ferruh Yigit --- .mailmap | 2 +- drivers/net/sfc/sfc_mae.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.mailmap b/.mailmap index 7de8dbf81d..eddb8a2c4f 100644 --- a/.mailmap +++ b/.mailmap @@ -103,7 +103,7 @@ Andriy Berestovskyy Andrzej Ostruszka Andy Gospodarek Andy Green -Andy Moreton +Andy Moreton Andy Pei Anirudh Venkataramanan Ankur Dwivedi diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c index 76b7c59ac0..eb97524dc3 100644 --- a/drivers/net/sfc/sfc_mae.c +++ b/drivers/net/sfc/sfc_mae.c @@ -281,8 +281,10 @@ sfc_mae_attach(struct sfc_adapter *sa) bounce_eh->buf_size = limits.eml_encap_header_size_limit; bounce_eh->buf = rte_malloc("sfc_mae_bounce_eh", bounce_eh->buf_size, 0); - if (bounce_eh->buf == NULL) + if (bounce_eh->buf == NULL) { + rc = ENOMEM; goto fail_mae_alloc_bounce_eh; + } mae->nb_outer_rule_prios_max = limits.eml_max_n_outer_prios; mae->nb_action_rule_prios_max = limits.eml_max_n_action_prios;