Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1649169pxy; Mon, 2 Aug 2021 07:04:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYWAEvdKOfNAzqvngLLGNPiDplLhOI5fIFKQtrkC9Z8esr5xufaH6WV92YZLl8PT8+lfbN X-Received: by 2002:a17:907:2712:: with SMTP id w18mr15907179ejk.302.1627913063193; Mon, 02 Aug 2021 07:04:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627913063; cv=none; d=google.com; s=arc-20160816; b=P+PXV4ZZIpfwu0LgGqFDPYJ4ezCaHM+a0A4GWqnj76s4LYvOnfMmoH0DV2qZanDslE hTBsAitGH08lHXO0Mr/X85djp885nRF5PDmlzDN/vp4uhRspUFBCcQXPuV6qe3lIqmh8 mmwMAT00WsLRcjyLdp9FBlyhL+L+NDzHWU04pR8BB17b1KRjUIA4mZA67pbWd1tGl/VY CKr5aQG+s0ReXU14rwB+qZPDFN8sG3KOLJPIev6XI5gjw/UhxQHbCIqLWvQ+4ndURtzG P/Iihej29o74QDoK2m8CSVXRvSLySbBFF+ukx68+JOB8JEBj4IKDZE3i8xeyB2oSV85+ eK2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=c0Za4Ts+NNUoksB11+QTfx/WX8ZeZ1tTCQNCmXLZxiQ=; b=Sd7b3eFTe1sPSu7r1/t5DXiUYeFlEHQhP/TdfSjttQFH/ob9o6mEgP1Am7vPVzRGWM 7FUUKveoJtSGNObFDqvcigAI+fVwCVHqM54TXcqGBAgnSBT85+uP/ncFirABhN6+44yv rGCS5U7yVXHZCQSTGBzyMLlkWLllNcyEqzQYKyi898++2+wzHUiHtnrfcA5oK+4KAscA wZ/08ms4gQuSLQop6ZERAt6dAghDCCniQ2rZ8OFIPb94twL3RA0WUbgppPNM1lWxsRTi UOouA4eTz3RGxMWRXJeY+6JLR97CBIuunSe7l3rObMG3+7ajGBga3MfVouCz6evW0ugU IS+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=t5VD5L9F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o18si9626546ejd.330.2021.08.02.07.03.58; Mon, 02 Aug 2021 07:04:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=t5VD5L9F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235120AbhHBOA6 (ORCPT + 99 others); Mon, 2 Aug 2021 10:00:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:40832 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236156AbhHBNzF (ORCPT ); Mon, 2 Aug 2021 09:55:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5399561185; Mon, 2 Aug 2021 13:53:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912408; bh=UfUyn9/pYIKv79cGUxfwYbkVUZbl5aotPAlYrdeQfqQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t5VD5L9FtQkKuUZ0DvMZMmon7TwE9g2bR5u0jxJbpCog+tlmYB+BhpHMrL5SVwaTe HfRRakeT0OROJK/BxckhKL0ciqfGMLdJDcKZZwa3AIZi0gt3Kf0kB2hLM0YXMR0E8u oNVvRtZ9nuUqs1JFiZefDOjrjjv6hd6JkfqxzrP0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Abaci Robot , Jiapeng Chong , Tariq Toukan , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 46/67] mlx4: Fix missing error code in mlx4_load_one() Date: Mon, 2 Aug 2021 15:45:09 +0200 Message-Id: <20210802134340.600483859@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134339.023067817@linuxfoundation.org> References: <20210802134339.023067817@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jiapeng Chong [ Upstream commit 7e4960b3d66d7248b23de3251118147812b42da2 ] The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'err'. Eliminate the follow smatch warning: drivers/net/ethernet/mellanox/mlx4/main.c:3538 mlx4_load_one() warn: missing error code 'err'. Reported-by: Abaci Robot Fixes: 7ae0e400cd93 ("net/mlx4_core: Flexible (asymmetric) allocation of EQs and MSI-X vectors for PF/VFs") Signed-off-by: Jiapeng Chong Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx4/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index 00c84656b2e7..28ac4693da3c 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c @@ -3535,6 +3535,7 @@ slave_start: if (!SRIOV_VALID_STATE(dev->flags)) { mlx4_err(dev, "Invalid SRIOV state\n"); + err = -EINVAL; goto err_close; } } -- 2.30.2