Received: by 2002:a05:6520:4d:b0:139:a872:a4c9 with SMTP id i13csp2568581lkm; Mon, 20 Sep 2021 18:57:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxjKmlRF3UcepUqr6GvJvcz2LTF4vg4Ytx8y+zUFsjuGKuYOJRL4v3Zmd9fwGQeHMAY/daf X-Received: by 2002:a92:440c:: with SMTP id r12mr19354812ila.174.1632189047147; Mon, 20 Sep 2021 18:50:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632189047; cv=none; d=google.com; s=arc-20160816; b=YoNpp1WvbI2VqQZusPhdowvXkosvtzySjZOfBTKCnW0NO3j59Teo2RSVp0mIYqtupJ O0zIzaIgdxNImj6KCyTR7ehp0c5vzNrIZ7WHPlxZ8ipb/ykFVPVnrZCkUN+pZKrXwW4h Di42TxqYFhn9D88VdMdv/qHy6VcFOveuOESGfJntuXJdc1bGCNfTVp4qYXkRFCRuMg6Y 0lUs4uIfTEUSADuAfg982csRDfc0Rn93xaj3EXp8wzUHMVFn23eo8cq85JnC28N1GeXj Z5EP6eZ4I3uAEFkKpolrS8t4wdsT7asAfmEZh+4+SIxqK9XE8qpwQ1S8znm0QwRV5l2W 0xpw== 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=5J/cAPH57TQcV10jAgCbCsRujwWMmbXBHxayEkcJsd4=; b=PcPOdjuQDM7Wm05OAYjz+ojl8Mcg+jzE97oY8IUdY+hGxZbsSVMsxrQT9yi8dq6A6q 9XL4qdTWRibY4ZqOrToCcba4yrOYbBAwD6KHBsQVESFTxS2ZfUyYxabKulkjThNG5YXP CJqyp+BZFJwg4RR2GyoeOPm8832NbHTIVPpWpgVZnaAhirIApdduzruzkZ03NP3EmteN NlTPrZYTu/xwWZJwdM1U4W6JCUEfdljnH7DpKyZCYyVYIt7yJfHChLpwuRWM0jg1LclX ySMpUJdCshfh6PP7qPtx2pWdb/DDNc62CVUM7DpED35iqXEhvP7DOl9zncBLB6tEUgU/ qwKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fSBk2X9e; 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 q10si8719915ilu.41.2021.09.20.18.50.36; Mon, 20 Sep 2021 18:50:47 -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=fSBk2X9e; 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 S1356031AbhITSAb (ORCPT + 99 others); Mon, 20 Sep 2021 14:00:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:54550 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355186AbhITRyS (ORCPT ); Mon, 20 Sep 2021 13:54:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 538FE619E8; Mon, 20 Sep 2021 17:13:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632158005; bh=fvQgCBKYGisPejRhGEFl2aUh1j1YdbWQOp0Ga5d9CN4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fSBk2X9e6n0mg4DpvSIQ7+wJUgnJShlbEsIDMYf0q45Y5kDz/7fna1eX5SXlVUnp7 hCvHMU1dSDEnDk1RXoeyTpFqWgDNigQ5E/GB9OKOVLANBYiG57tJBBBq64oHBKVWBQ Bfamg7lG3YSpcEVftfQiEetJPKhnRaenB7MfR5XY= 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 4.19 252/293] bnx2x: Fix enabling network interfaces without VFs Date: Mon, 20 Sep 2021 18:43:34 +0200 Message-Id: <20210920163942.014499180@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163933.258815435@linuxfoundation.org> References: <20210920163933.258815435@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 @@ -1245,7 +1245,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; }