Received: by 10.192.165.148 with SMTP id m20csp551519imm; Wed, 25 Apr 2018 04:07:55 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrgkwkfjDEF7kZxtob02apXoGYakzMiPCAMGv5lTWaXbhzkOtpjKc56X4Lxo33bZcG+fyJW X-Received: by 2002:a17:902:9688:: with SMTP id n8-v6mr4799201plp.366.1524654475096; Wed, 25 Apr 2018 04:07:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524654475; cv=none; d=google.com; s=arc-20160816; b=HZVObkdQjL1I4uIrRTmYQPBFrhlmybEjqfpWjPrzkndj0x96MZ2s3bvyatS10PTL05 VRGMG3JqwbvuquQMwtg8ustAyEnk9yCYdvMZ0G2sOChXAvUUZYCZVJhtjyQb79YuHSdD zIFJFqq3F1X025DIwKGuuzz5JANrbq99yDEVxZ4p3OIOBtXkVu3XwMXBFLpBVWqez3H0 zv7DbQzxM8wuTUx0GvVWhJT7jHdgfDPbSCeb8gNblsU3Goti7zGyq7UJp5zpA5u2dn3g JWxX8tLL6/4xVwvniZe0iMqNJpXiAvywl9aXizTIvudpy47aI34KkoYOlGK5gLpcImKl WmYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=//z04BHgx0U3HCR9PbECnShP1cc77rGzdC0YFJcCyuY=; b=B/gtSGOwYEWs0Ho8XQvZuYMSoXO9Cjg1NoFcgnbtHm6a30Po6nu71v3fLnXJO32cyD o8MewQhS6ZcJuOiBRYvk8TSi+DkzVg4yY1JTjmMNUMXIzI4mbvBtDts7TglR5qqkIAnu TzzJM1/RLz99ALKl77OAuzv/qCSBsR1Qxgwc/DQeSApxMo6IKUHFLVRvUhEIU7XqZDwc CPwls5mxdYb/qBfan0PI1P/gvNQi0H/6NrDj+BB8WFALpVup3PHlgBfxzBRi5soQd4EO ONeITUpcK0cxN/zr7Fl5Hyi5mer0tK6gcsq5PhB+usSD+1TCaC7g4Phuui7MrZDZBH4f 5QLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k11-v6si15051076pls.368.2018.04.25.04.07.40; Wed, 25 Apr 2018 04:07:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754021AbeDYKlu (ORCPT + 99 others); Wed, 25 Apr 2018 06:41:50 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:52442 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752292AbeDYKlm (ORCPT ); Wed, 25 Apr 2018 06:41:42 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4EAAB481; Wed, 25 Apr 2018 10:41:41 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wei Yongjun , Jakub Kicinski , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 075/183] nfp: fix error return code in nfp_pci_probe() Date: Wed, 25 Apr 2018 12:34:55 +0200 Message-Id: <20180425103245.526116779@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425103242.532713678@linuxfoundation.org> References: <20180425103242.532713678@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wei Yongjun [ Upstream commit e58decc9c51eb61697aba35ba8eda33f4b80552d ] Fix to return error code -EINVAL instead of 0 when num_vfs above limit_vfs, as done elsewhere in this function. Fixes: 0dc786219186 ("nfp: handle SR-IOV already enabled when driver is probing") Signed-off-by: Wei Yongjun Acked-by: Jakub Kicinski Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/netronome/nfp/nfp_main.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/ethernet/netronome/nfp/nfp_main.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_main.c @@ -492,6 +492,7 @@ static int nfp_pci_probe(struct pci_dev dev_err(&pdev->dev, "Error: %d VFs already enabled, but loaded FW can only support %d\n", pf->num_vfs, pf->limit_vfs); + err = -EINVAL; goto err_fw_unload; }