From patchwork Wed Dec 13 14:08:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 13491078 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="O5o0ZPpE" Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3080F10E for ; Wed, 13 Dec 2023 06:08:23 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-336417c565eso390064f8f.3 for ; Wed, 13 Dec 2023 06:08:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702476501; x=1703081301; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=yGQHYGvUGPNJmb4hVIhsOVrOl28DMQquary28poyEhI=; b=O5o0ZPpE38r9DtTMRiad58fmRZtMLom8DhHIsAEnJoq+zymQikqvINxg2E8KqZBx8Z XrRKLgwuh19odsRiWadRYQY0jrPX1wKHAN63h1HWcWdzv9QaOW0MCGeQLNm9YeY4NRNm U18smnMI3TvSyZ2myQILJH0b7YGSyy7kA7iNvGFR2zD38PbpLHmg+wi5tKIrPcoK+VJH 7JhlGc4a3QWf0TvSUJwFt3hstbCOnarCC+27eSgojbqAtqiUWRz/NQYXLPw4H2M5kOg9 O+ceZrQZHgtHA7jsgNpHzg/wZ+pcXMjjw2yJF/lLAyAOSI8+2uYGknHvDef2go/b5CLr khRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702476501; x=1703081301; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yGQHYGvUGPNJmb4hVIhsOVrOl28DMQquary28poyEhI=; b=uUp6O1AaU0G1HORNEK96PMyxOLafauYj3cc2pkITa1Mu5oyWnBn2RUSMy8Ki3ytcy9 5pFc8ruWcdknuRXRE5qZvcXk2d/rViliYZ7sTpBf6j2KuJCJYEsO8rNR8EmKHxijCXhr jCBGXrsO0ulTB4IxjWWUjXCoYn+YXeTxKGldVfuFxnwvt/g5SDHBJfSZ5v6opjNaK3vL CBvyZoSp/u9rKd7ByQ1+OOxF4/3nIIo6iTHTB4ytYD/cfhEs969IJCjfYfjQzrXhFQE3 Im4sxuiaqFgoO6fIZn950ynTX/6TlJ7WXtq5svAfImLG/khn4riSL4IK8RTc+MDHl9iA zhVg== X-Gm-Message-State: AOJu0YyIsC132Bueo2OaFgSAEmOmyf3qyHlPTSc7Eo5fOxqywJ//k66S BMejB4r0BH/Ld4fXhwPqpBShrA== X-Google-Smtp-Source: AGHT+IEpPZzYdPLXcduF4nA5EE0q3P+XBry3Mlf1s1dZQZdQPkNvjIpr6Jz9Er27c37Xasi27rYwmw== X-Received: by 2002:adf:ecc2:0:b0:333:2fd2:3c0d with SMTP id s2-20020adfecc2000000b003332fd23c0dmr3268204wro.198.1702476501663; Wed, 13 Dec 2023 06:08:21 -0800 (PST) Received: from localhost ([102.140.209.237]) by smtp.gmail.com with ESMTPSA id h11-20020adffd4b000000b003333298eb4bsm13575958wrs.61.2023.12.13.06.08.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 06:08:21 -0800 (PST) Date: Wed, 13 Dec 2023 17:08:17 +0300 From: Dan Carpenter To: Paul Blakey Cc: Saeed Mahameed , Leon Romanovsky , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Oz Sholmo , Roi Dayan , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH net 1/2] net/mlx5e: Fix error code in mlx5e_tc_action_miss_mapping_get() Message-ID: <133f4081-6f34-4e3b-b4b5-bacd76961376@moroto.mountain> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding Preserve the error code if esw_add_restore_rule() fails. Don't return success. Fixes: 6702782845a5 ("net/mlx5e: TC, Set CT miss to the specific ct action instance") Signed-off-by: Dan Carpenter --- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c index 5775699e1d3e..30932c9c9a8f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c @@ -5736,8 +5736,10 @@ int mlx5e_tc_action_miss_mapping_get(struct mlx5e_priv *priv, struct mlx5_flow_a esw = priv->mdev->priv.eswitch; attr->act_id_restore_rule = esw_add_restore_rule(esw, *act_miss_mapping); - if (IS_ERR(attr->act_id_restore_rule)) + if (IS_ERR(attr->act_id_restore_rule)) { + err = PTR_ERR(attr->act_id_restore_rule); goto err_rule; + } return 0;