From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 81E8C320F; Tue, 14 May 2024 11:53:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715687624; cv=none; b=t9u5XpM8qKUS5NqzGqVVCojPebH40oQgGB/4QC2FVt9ZBuHtUBOtykO70Nl4DQUKzMp9uScr4UgUv/MI2EZWZM028gGwLK4UXVWxlyjNgv6Ksg3uAMsMwZjvCJbajL0+Y2RfLKcBKrwAH/mKq+OC7mvZ0OCjKM/S9n7V0OeJ9OE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715687624; c=relaxed/simple; bh=7NDyl5JpbURZJ4YasUOrHg564JDu3HfkPc5847MtOWg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RgV+eAI9C7MKpZvHJcBLOWImahYgBlHXIPFzpfdr/wijr/OO42VYvend7LS68f11SHvzzagCfq33mTiVFFaybj8aMVliCqJ7BigXQTHoSxEJZ0R7jT2Ptmuqh9pi+G2zVoZdWo9eBx7MA4Wd1JVz+JJqv/hGwqdPpgaF/JlqbqI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=eGat9nx0; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="eGat9nx0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01381C2BD10; Tue, 14 May 2024 11:53:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1715687624; bh=7NDyl5JpbURZJ4YasUOrHg564JDu3HfkPc5847MtOWg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eGat9nx0Urq2D4ucWZpC+YBy/Rr75BToqcFuJiutmcZWcFoEws2Fq2KJBmg3Fi+1P HB2RCo4KPjqEhie2cEmZtIiLO/zM03Jevz0KEJeqaczcSOZNkqh93yAYysvMGsAtYu VMHNSjjJWpKNfbhR61ddhKirQdfok9rp4SPLFQMM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= , Simon Horman , "David S. Miller" , Sasha Levin Subject: [PATCH 5.15 041/168] net: qede: use return from qede_parse_actions() Date: Tue, 14 May 2024 12:18:59 +0200 Message-ID: <20240514101008.242840071@linuxfoundation.org> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240514101006.678521560@linuxfoundation.org> References: <20240514101006.678521560@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Asbjørn Sloth Tønnesen [ Upstream commit f26f719a36e56381a1f4230e5364e7ad4d485888 ] When calling qede_parse_actions() then the return code was only used for a non-zero check, and then -EINVAL was returned. qede_parse_actions() can currently fail with: * -EINVAL * -EOPNOTSUPP This patch changes the code to use the actual return code, not just return -EINVAL. The blaimed commit broke the implicit assumption that only -EINVAL would ever be returned. Only compile tested. Fixes: 319a1d19471e ("flow_offload: check for basic action hw stats type") Signed-off-by: Asbjørn Sloth Tønnesen Reviewed-by: Simon Horman Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/qlogic/qede/qede_filter.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/qlogic/qede/qede_filter.c b/drivers/net/ethernet/qlogic/qede/qede_filter.c index aeff091cdfaee..8871099b99d8a 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_filter.c +++ b/drivers/net/ethernet/qlogic/qede/qede_filter.c @@ -1894,10 +1894,9 @@ int qede_add_tc_flower_fltr(struct qede_dev *edev, __be16 proto, } /* parse tc actions and get the vf_id */ - if (qede_parse_actions(edev, &f->rule->action, f->common.extack)) { - rc = -EINVAL; + rc = qede_parse_actions(edev, &f->rule->action, f->common.extack); + if (rc) goto unlock; - } if (qede_flow_find_fltr(edev, &t)) { rc = -EEXIST; -- 2.43.0