From patchwork Tue Nov 28 13:13:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 170778 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3908272vqx; Tue, 28 Nov 2023 05:13:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IEudbbvhERHBZk0UIbiCDGT4UiWxN4m641KM+zJd7rnxp6T7FqSFqCps5T12uS0k7GskfR9 X-Received: by 2002:a17:90b:4a50:b0:285:940a:b9b1 with SMTP id lb16-20020a17090b4a5000b00285940ab9b1mr14307207pjb.26.1701177209405; Tue, 28 Nov 2023 05:13:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701177209; cv=none; d=google.com; s=arc-20160816; b=bnF16KcSCN9RJq0ilYdJerMm01xg7XxDq04P0X4aWYNgR4UQuTesC+JInxzPlOaq4R KpeQSKRj0YPOp9uWXEpVYZLwtnFeYPoap+nxOAG3nuNkIpehwSYAuph8xEEBT4Qbpowo fO9HXOGQ5z5j8faGa7AOoxDv5+OEI3BSmTCAm5Dkj2vTNGXHIzkRkUxl55lVFrnT7nI8 6yhXkNhxDErD5Js5EU/pa7Tho111kraz3p/MehDZmmXs7dcKLO8kxO6YY1qbu20Y5oRJ SVjStwJyXfzjNUWE2kH7kb/J7ypQ61zrtdTcFBj8EiqBLbktG38NVtEwDY20pT/HcWVc RxTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=X4lKo9bLDim6aDctAZZS9tg9Ds7n6sj9Q/UD4Yw1TdY=; fh=ByamcrmuswqmgPlWUGCcOeP3VbMfIseGaGGAalXXuOU=; b=B/0smwYxMn3Nte09DSNQwsL902hH2/med5/Isi3x+hpGdyWPuxBOpJ9tWaTSmVfUAM gph2E8f8OhqNAv4qqUFYl6fngipznuCMXXzFPVvxrPAL6GrSOoIRxXl/7pDY7WpU6F3D R63RLXZzmtRahgg6TW5SnCzm2qgvd2KXYDmUzHFceZecBndDzY6SXvep3F5KhpfjnzNc RyRymsJh05vgcySgZjVDRsYU6HIbLNzs2F3xhiaiuXp9WG14AY1Mq2PhEA3dKocJJjmy y+NtRM56sHRTlIIdiwmp24Lrjb9GGyn3/QwzbXZR7AEzt7jeQ2iy9PEV4qJGa4sFDjMP YxbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KDspK1lQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id i9-20020a17090aee8900b00285f8faa858si1478053pjz.43.2023.11.28.05.13.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 05:13:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KDspK1lQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 3FE878072804; Tue, 28 Nov 2023 05:13:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344860AbjK1NNT (ORCPT + 99 others); Tue, 28 Nov 2023 08:13:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344343AbjK1NNR (ORCPT ); Tue, 28 Nov 2023 08:13:17 -0500 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B2FEDA for ; Tue, 28 Nov 2023 05:13:24 -0800 (PST) Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-332fd81fc8dso1750209f8f.3 for ; Tue, 28 Nov 2023 05:13:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701177203; x=1701782003; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=X4lKo9bLDim6aDctAZZS9tg9Ds7n6sj9Q/UD4Yw1TdY=; b=KDspK1lQGnrqXT7YQDub+p8H/owMmhXYQEyfz79Xikk6rbcvJWhbeltXH+tKdkSnWn HP2igLRfNEZds7Zc+SI/I4o0nudIf5+5Dwgdg4Z01eGNCJ7IZF4dPw9XRfWgRdCJAPw5 uK+uOSNgMyzZYit2Mg5rydT/cihk+lwj9Xble6UAtIv7AD3W934KIh29GJhb7sFb3FAB LqNnHYxwpdy9TLVDk4K6Ma2VbVfdn+kJsNOvXu6gHsHL4+wI7H4BfQprG1gZN3gToXx6 um6eSzAkz0PHVhW8qGAq9pfhUz3WgpJq6lotMToCTNhnZzEoo/r0MVE3oTSqoMC92PYD t2yA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701177203; x=1701782003; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=X4lKo9bLDim6aDctAZZS9tg9Ds7n6sj9Q/UD4Yw1TdY=; b=DH55R4m+s0vpAJwVwmENuOKPPb6UdTc12IfhpV2erUi4DdI9FpQKRv73dEwFmjoGUb BmyKJF9UC96bAu3zQRy+xGsBuv+VzlXYQtxihb+4bbkZZkDOaIpG73dM/gOMn55nQUVB tfnG2acdUDaArtdb2Njn8E1mn1ZvK13B++bEbM1Um8rrOXQQYjCc8ZAsk/tJ9GDOODxn zWhG/mcsDQUMUKNx4F7FNoFe2v04AxNE5d1SoJlDnY7fdfrWyxuMB8ceJny96oNMCzsc kP35SS/t3PPfPMNgfZysjrY1e/RdI31WVUmu1O+qNyNwgzuef0qjYIhhxX627Q42hvkP teqQ== X-Gm-Message-State: AOJu0Yx8NO5g2aaws1XjhbTqan7bbrtouTcRTyTEv+g97HURI67blfVG A1TFHsjZW62od8u9nMvvziYzKQ== X-Received: by 2002:a5d:458b:0:b0:333:73c:7850 with SMTP id p11-20020a5d458b000000b00333073c7850mr3441608wrq.34.1701177202769; Tue, 28 Nov 2023 05:13:22 -0800 (PST) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id h15-20020adff18f000000b00332ea526059sm12038283wro.82.2023.11.28.05.13.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 05:13:22 -0800 (PST) Date: Tue, 28 Nov 2023 16:13:19 +0300 From: Dan Carpenter To: Shinas Rasheed Cc: Veerasenareddy Burru , Sathesh Edara , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH net-next] octeon_ep: Fix error code in probe() Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Tue, 28 Nov 2023 05:13:28 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783813593865613311 X-GMAIL-MSGID: 1783813593865613311 Set the error code if octep_ctrl_net_get_mtu() fails. Currently the code returns success. Fixes: 0a5f8534e398 ("octeon_ep: get max rx packet length from firmware") Signed-off-by: Dan Carpenter Reviewed-by: Simon Horman Signed-off-by: Dan Carpenter Reviewed-by: Sathesh B Edara --- drivers/net/ethernet/marvell/octeon_ep/octep_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c index 423eec5ff3ad..f2e5c7d80398 100644 --- a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c +++ b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c @@ -1383,6 +1383,7 @@ static int octep_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (max_rx_pktlen < 0) { dev_err(&octep_dev->pdev->dev, "Failed to get max receive packet size; err = %d\n", max_rx_pktlen); + err = max_rx_pktlen; goto register_dev_err; } netdev->min_mtu = OCTEP_MIN_MTU;