Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2350633pxb; Mon, 20 Sep 2021 19:45:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzi3ZGf2c813mVIz1rle/oQzu1E3jsOpxfchJi9UlEPV8Bi7u+svgwkKmzQxYZqZO/yl873 X-Received: by 2002:aa7:de14:: with SMTP id h20mr32792852edv.24.1632192353402; Mon, 20 Sep 2021 19:45:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632192353; cv=none; d=google.com; s=arc-20160816; b=ZWsDQAthiL5dkIOPZ3e57Mt6mxd2x5XPrKvUqjQrtamupeLmzSHR5nIoDk65BcY2mB wYF65WAHQSZRu7SEWuifiQLdN1vtFt7ZbTq4X0Vl0T/MkT/s1zN74xqlz1y8GLlOl+iv Opa9j6EWF2GfksBjAFZR3p9i2/9tURJUv7G3pJsI72LuSvi8WG4idTu1sks6gejQNtHF 3TmfHa6ZZuKlLZY7GRTzmcOMNWR8OenT/tFetSO7tk/OZlBS/CfSFrhcUifwPYeqbN8N WVQpSaBoU//eGlh6QAcbnEiNXZJAj/cqBz3QiMRGHy1Mma2TFLklqbAKq7p2ljUZlAAG VNsw== 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=pZrvC8yozdTHF7atIg9dETRzEpKyJAvs2lJbKC7/cwM=; b=C+eKciH2ge6t5pjVm5M574acgaacJbeyIDLHPzSe/m7LQWNKhPgwNPBBe8itdFtWhw FCvdOhMiVVZbYjvrSptfXLm4x14h0qvdrxXzDPJYgthiqXQsVHFa81LYBseFqleJnXxd mrYY7eRH5NOQRevgQSUN0SEhgvL/nruvsxp7fRuz9BC0w9Db2UNJrQ7gN/9RQLY60p/x HpDgQpC4T9jxmmJft/6n6kkV0K8wAmjOp0TYpcIO0D/FCQTGcBaPeRXZ4fwHAT2cLUMk oY3MA9NGAVJv3Bdoesdt8BTaWKAW1/4BEJB1+cukesQiFxfMm94n1vRt+5fTMGCZ2sMF iZow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jwSOinp8; 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 p10si10061650ejl.495.2021.09.20.19.45.28; Mon, 20 Sep 2021 19:45:53 -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=jwSOinp8; 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 S1348636AbhITSZl (ORCPT + 99 others); Mon, 20 Sep 2021 14:25:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:39242 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351318AbhITSS5 (ORCPT ); Mon, 20 Sep 2021 14:18:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7B460632A6; Mon, 20 Sep 2021 17:23:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158590; bh=Yj1TZDy2FUjXAXfIjbZskgaCeCbx9tYsqXQSQSi/SP8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jwSOinp8VshhZTIwtKnL9bjjWOgk++XT9Wbcvy3b6AJoHnuz7TRJB3DGAKGLFc77O KHLHCbRcil/uYsAFS2P6IOXjO6gFYCO2OEljaRQEVhWa+iFc22ECEdvoJ4IikydJza 7UwfU4bSbYWwuF5v1TxBquzom4gK9G1Em6MWTiMQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Adrian Bunk , YunQiang Su , Shai Malin , Jakub Kicinski Subject: [PATCH 5.4 194/260] bnx2x: Fix enabling network interfaces without VFs Date: Mon, 20 Sep 2021 18:43:32 +0200 Message-Id: <20210920163937.704556034@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163931.123590023@linuxfoundation.org> References: <20210920163931.123590023@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: Adrian Bunk commit 52ce14c134a003fee03d8fc57442c05a55b53715 upstream. This function is called to enable SR-IOV when available, not enabling interfaces without VFs was a regression. Fixes: 65161c35554f ("bnx2x: Fix missing error code in bnx2x_iov_init_one()") Signed-off-by: Adrian Bunk Reported-by: YunQiang Su Tested-by: YunQiang Su Cc: stable@vger.kernel.org Acked-by: Shai Malin Link: https://lore.kernel.org/r/20210912190523.27991-1-bunk@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c @@ -1246,7 +1246,7 @@ int bnx2x_iov_init_one(struct bnx2x *bp, /* SR-IOV capability was enabled but there are no VFs*/ if (iov->total == 0) { - err = -EINVAL; + err = 0; goto failed; }