Received: by 10.213.65.68 with SMTP id h4csp2152493imn; Sun, 8 Apr 2018 21:03:55 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+LASFYXIHuyMK7Cx8hSP9FAdFknRfhf2o8MGanURUk05m5DxRaAxYskk1zwx/5SBx8ZKMp X-Received: by 2002:a17:902:1e2:: with SMTP id b89-v6mr36374520plb.389.1523246635629; Sun, 08 Apr 2018 21:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523246635; cv=none; d=google.com; s=arc-20160816; b=WdSt23VtY0rqOoIKpsnirxN3WRAoN7OTPt/Ab4NMLhNR+pEmG9vF4PXEMW3dNrk1+q 0p3aZkeVj3NbFiCj6ApAWwYDzbbfe01d0oKdF1B2FZU5EmUAukKrWkHxR9L/dZWXR4Dq UxrW/WJikpZphQ3c69eLESJb8av3NE2QPU1fNFj+XzvwjU14Alzv2XunY+FIy/5L5r5/ 8iwLb24sxI4jMsHk3HIwSRBO2KGz1JZfeE8VJhW7QEP5AEDLbl+plIQ2WvpZuItnGLcS hWqhkGADK1Z05E67djeQyeTLTtbWiAfvwQBgwmBTxxrOVnUDw/5ee5h6Ulks+BfpRLKf 3gXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=RvwhaYwxcuSgJ4hFyWePtOb+VOZlTi5Ys6WePmjDjD8=; b=FyAbEFWl88wSvV+hMyUnSQMXkgUVTjphSXYo9zDAf0052Ud+oAQ/RB/heK8JTXskK0 7/wZ6N6m0x9mLM8vf844NUs8jYaJrI3kzxO03drU8yjEcbpKlCzkY5ZYMEeChBWqOVmC l8fOOrkAdr/OCsk1GZ/TZAxdzUoEZuFCr2qsRT6swHmxUYtD1Xqr3SJxA7GytHIwAVVl yp3gkuoII6HFk7VSEHeortHJSVUigdrDeWRFDXpjWnbrFd2GZAiqfLGOXP9pm6oyW8qZ /rAgH1tBYJ2tCkHs90eHO9bvEkxW5Iq3l4XQDGbEAXg/v82XaNIUMYf0HmTPnl/9gYP7 Cvcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=DeaMQan2; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 3-v6si14197212plc.325.2018.04.08.21.03.18; Sun, 08 Apr 2018 21:03: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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=DeaMQan2; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754123AbeDID54 (ORCPT + 99 others); Sun, 8 Apr 2018 23:57:56 -0400 Received: from mail-bn3nam01on0092.outbound.protection.outlook.com ([104.47.33.92]:62923 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753697AbeDIASj (ORCPT ); Sun, 8 Apr 2018 20:18:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=RvwhaYwxcuSgJ4hFyWePtOb+VOZlTi5Ys6WePmjDjD8=; b=DeaMQan2HLnsQWYa0Up58o8Q3OGjIf9gStW6UDlVe/w4atUkRA1eUaKfD8HuJtliUwWU/JuX78HK4k+2IVVU+I7ei2d+SKT/YT6PDI1ejZWbJ3VyYmtqnNlPGBKJYsZncqZ5uMrqodicD8/ASg3czVETvJnfJN/kL4UyK6rprsU= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1128.namprd21.prod.outlook.com (52.132.133.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:18:35 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:18:35 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Wei Yongjun , "David S . Miller" , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 074/189] nfp: fix error return code in nfp_pci_probe() Thread-Topic: [PATCH AUTOSEL for 4.15 074/189] nfp: fix error return code in nfp_pci_probe() Thread-Index: AQHTz5gtSTIqHO7geUKQqaE+xTSw4g== Date: Mon, 9 Apr 2018 00:17:43 +0000 Message-ID: <20180409001637.162453-74-alexander.levin@microsoft.com> References: <20180409001637.162453-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001637.162453-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1128;7:48xYN8gmjTJtMP1Lc6CmEoOUnl+eEOvMGszPEVJXrDW79J4hdmDUVCPpKPVsI/ocHjvqkgnrDnqUvI67tCbV94DrTsWolI2W2G/P9qkmOp5sAuiAx5P2x8qsmuvMwJpYRFvyeCocqZSBHjh4aAKbOIkUWWHc6F1EczSJ/P4vqKBk1GoOBIdwoWguxvmbnaPatZytmkDmEhq36HZjYubfvYme/hLtXLCqYIw1oeu8iqHbk0FHm7ZFyi7IA0Zi+6HF;20:fTz4Epp2t48HehqjvTaTR75Meifges40uboSYMK1v5RcfYSL27LIHrA516HrSzw5Q0AVtV8N2DjjgnIRsQi8d9I4++PT3LODeKlSFHR5cw2K3RKF9z0ztrbMzW3ZQ9tZc7RYPvT+Ouam/jtIwx9WktIqCsks+LK3RH6n5tmMYOk= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: cfd3bf30-2187-4224-1f7b-08d59daf6f15 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1128; x-ms-traffictypediagnostic: DM5PR2101MB1128: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(50582790962513); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(3231221)(944501327)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB1128;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1128; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(39860400002)(396003)(376002)(366004)(39380400002)(199004)(189003)(66066001)(86362001)(59450400001)(3660700001)(3280700002)(2900100001)(25786009)(36756003)(6506007)(76176011)(2906002)(6486002)(86612001)(99286004)(102836004)(1076002)(7736002)(97736004)(2616005)(446003)(486006)(11346002)(476003)(26005)(305945005)(6666003)(6512007)(4326008)(107886003)(478600001)(6436002)(5660300001)(10290500003)(5250100002)(22452003)(316002)(105586002)(186003)(8676002)(110136005)(54906003)(72206003)(53936002)(2501003)(68736007)(14454004)(6116002)(8936002)(3846002)(81156014)(10090500001)(106356001)(81166006)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1128;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: j46Vb/AsyCjzJGrhgMe9x0Sq0eRzg9vECbCnSsMrxBgLq2ihrYbOW91bw+ofILTYzbFo1vOU7UdnvoSK/fOIcJW/rfmtJrgGzFj637iPCz0ZH/zFg0+5b/dmMdz2CDDrkLdbkxKK5Enb9WmJW+8081Cblw85/W6lxBzjqJh4WszDVbKaoTSq/2vSODnj+/mmFTDWhBNA6fAih6YpoKIhU+Vg4MarCmqWB4X0xj+SUAObBjnXOLgPUqPSIm48Deug29DjVLXsV4GR6/fv/lBgrZU6hLfwTmeTTuTtaNbHEc32kv6Vo4iFEYMeOmQQZLGcLHzwT0ZU993CVtGUgf3l7Q2ow3nFuSV9d+zxK2N7dFzSqjWSJKd4kcErabZ4GlKU7rcGouqzz+FEaN3ezuimzzk08eygdGug2EaJ2rlTFF0= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: cfd3bf30-2187-4224-1f7b-08d59daf6f15 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:17:43.3208 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1128 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 pro= bing") Signed-off-by: Wei Yongjun Acked-by: Jakub Kicinski Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/netronome/nfp/nfp_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/netronome/nfp/nfp_main.c b/drivers/net/et= hernet/netronome/nfp/nfp_main.c index 35eaccbece36..2222577bdcf3 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_main.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_main.c @@ -518,6 +518,7 @@ static int nfp_pci_probe(struct pci_dev *pdev, dev_err(&pdev->dev, "Error: %d VFs already enabled, but loaded FW can only support %d\n", pf->num_vfs, pf->limit_vfs); + err =3D -EINVAL; goto err_fw_unload; } =20 --=20 2.15.1