Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp121288lqp; Fri, 12 Apr 2024 12:14:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWGE+ZY7eg5j59LMlwGXPgwRMxgVJohqf4icgQvHLNd5OCYD0qFwkfNBKz/sStr8Wyla0eor07xWtzeAIYvsYnz88NnbRReAIXXtaQ0Nw== X-Google-Smtp-Source: AGHT+IF4mlwkbo9NBUZv521Ql4WLAPO7GS2Gg/h3jfIMGlCnKH+TQekE8VCKYS+4DakmbnTAOqy8 X-Received: by 2002:a05:6358:9696:b0:183:e9f8:19ad with SMTP id o22-20020a056358969600b00183e9f819admr3147451rwa.18.1712949263134; Fri, 12 Apr 2024 12:14:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712949263; cv=pass; d=google.com; s=arc-20160816; b=mgNKXJjz2R0Kactpp5Qe+Nz+5X1ONJytEcG4qb90RUsnWjl8Axgg9hQ0/uylwlnvwf Bbgq14Otu8iPJI9K6BNMfcoxWsIwQWdF4sC0HNQVwdXlN3La7+87tpO5/fvs9LNoK1T8 UyT0+KAr8HhL1KFVIVpfOzZBZyo77m9Gau4hsrWY0GtL5DmUi7Y6CXSZELGSb+GG+H2l rn0VVNh8Zcuz/MEATszX2Lx8BPYXKTKBI1j78r5tyvAKZHrwmoxQuCLwdlZ+mIcSHcJz u+721zcoyP8vX3FCAIY5YdEWZV4ACY0cYq6eLFy4QuivfD2r8abvCCZqPHDymqoz/iO1 1VCA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:cc:to:from :date:dkim-signature; bh=tk9Emnw0f/I+YVxqrFTb83J6j8sBAGuz6AYRURbjj60=; fh=xgErBZakfvadfNMsQ6uNkgHkExXz3L5I0YF+kdbe/5M=; b=QYKSK6FKFcVPt31ljPF4tGns692EWYCpgo6LDC1W0wV4eGwEbxl58ha4cZZK/967t3 57lm9vBopij6/3IqzHV7rwlvRrc8ajlQ+8gIAuIbLwa8ejqjEFxIC9yS1va7ta4fT5RO oZqmER3JFEd/9QiEhBCg2P0pC1QXUcBY5QuqMsqM/U7/NC8g0UU5cHX/i5IvjXDvrx4r Y0blJIggz2gfn3SJt+QGe7nNB1knlqTr/m4R44V2HcGMlNd5BCF9dENt77PbSu0sNZXf 8/4F/XzQirbfU2HlH0v3gokZzPy4nM4/7e1VTonTtoPHQMOkilxs3+0KU54d3AuBQidR exEQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SjVggVJ8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-143244-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143244-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id y7-20020a05622a164700b004344a5e5d69si4657664qtj.747.2024.04.12.12.14.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Apr 2024 12:14:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-143244-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SjVggVJ8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-143244-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-143244-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C50861C21FD2 for ; Fri, 12 Apr 2024 19:14:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C94415099A; Fri, 12 Apr 2024 19:14:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SjVggVJ8" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D12914AD37; Fri, 12 Apr 2024 19:14:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712949245; cv=none; b=kCCGG2BFc0QP5zoRZ2h9R9aTGbZ2vlHw4sTklas0JtYs7CQ9vzqUECBBzem0ccsGXTSJcqNwIbxk/6ZTVmN+RTtw8rQp0MlyM/SV3LZwnhVcGQYzGsxX8fsRKAYbXdLoZuUVp7TyI77D2KP2uAYebz6h8Pk0DzPLFKxObOLjT78= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712949245; c=relaxed/simple; bh=cQNWyLD2FXfR0yTg5/S/h+2fInQpSquK/RmrY9b7Mz8=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=uNkjP5sbbFtzF5p2kR7kEhiNUT+FnjcoYtslmQ9s27/gfowKr/vanzEfruSmZGTcn5u9SUta9PLFcj0wQ+AWzaBsFbphK+F88qEOcfp13/oIguTV/JVhHyrg1NVzKA4T5pCrrguBCav/b36uNJOQsR/jlib0Q3ew0AxXz97hohQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SjVggVJ8; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2E21C113CC; Fri, 12 Apr 2024 19:14:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712949244; bh=cQNWyLD2FXfR0yTg5/S/h+2fInQpSquK/RmrY9b7Mz8=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=SjVggVJ87kGjQuEsrOsNZnIIfAWGFMlRga+rNqiycOEgJOppv6aYB55CDWixv2RAm +iuQR4ebN6F8HeU73Ay0Z9vUXZTnoni3WoKYYOjGZcMBqYLIoVe0bNiBAW+v7y9HkG TI34d6nA8XrJYbcKnSQAPLfPkJoLdXljv2GkTCvY1YgBlPsSYXriEQmEk7Tj/vXgPi BDYlUkIR1Zhy/gF6zp/JSCtMFbRtZbOWKMp+zKki2RnPRROrnx4aylrfVW6yJvlQdY 7Td/LciZFcnWYHIU8k/ka2mROB7uwYk55DqUQjJcKI9ObxPuZ3d+xOkvX/hjiRgpu9 BggogoAJ7PdDA== Date: Fri, 12 Apr 2024 14:14:02 -0500 From: Bjorn Helgaas To: Vidya Sagar Cc: lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, thierry.reding@gmail.com, jonathanh@nvidia.com, linux-pci@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, kthota@nvidia.com, mmaddireddy@nvidia.com, sagar.tv@gmail.com Subject: Re: [PATCH V2] PCI: tegra194: Fix probe path for Endpoint mode Message-ID: <20240412191402.GA10938@bhelgaas> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240408093053.3948634-1-vidyas@nvidia.com> On Mon, Apr 08, 2024 at 03:00:53PM +0530, Vidya Sagar wrote: > Tegra194 PCIe probe path is taking failure path in success case for > Endpoint mode. Return success from the switch case instead of going > into the failure path. > > Fixes: c57247f940e8 ("PCI: tegra: Add support for PCIe endpoint mode in Tegra194") > Signed-off-by: Vidya Sagar > Reviewed-by: Jon Hunter > --- > v2: > * Added 'Fixes' and 'Reviewed-by' from Jon Hunter > > drivers/pci/controller/dwc/pcie-tegra194.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c > index 4bba31502ce1..1a8178dc899a 100644 > --- a/drivers/pci/controller/dwc/pcie-tegra194.c > +++ b/drivers/pci/controller/dwc/pcie-tegra194.c > @@ -2273,11 +2273,14 @@ static int tegra_pcie_dw_probe(struct platform_device *pdev) > ret = tegra_pcie_config_ep(pcie, pdev); > if (ret < 0) > goto fail; > + else > + return 0; Wow, how did you ever notice this? It looks like this path would previously have returned "ret" (which was most likely 0 for success) but with an extra tegra_bpmp_put() that we shouldn't have done. Eagle eyes! > break; > > default: > dev_err(dev, "Invalid PCIe device type %d\n", > pcie->of_data->mode); > + ret = -EINVAL; > } > > fail: > -- > 2.25.1 >