Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp96321rdb; Tue, 31 Oct 2023 01:37:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFg+Orw1pGMQ/l3fHxsHd2EDF8x5knzw+GHOVx4giWVW92qIfkTMCZn3o6MaBLHXdnm5grB X-Received: by 2002:a17:902:a389:b0:1c9:c46c:71fc with SMTP id x9-20020a170902a38900b001c9c46c71fcmr8257840pla.59.1698741460243; Tue, 31 Oct 2023 01:37:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698741460; cv=none; d=google.com; s=arc-20160816; b=ugzU3zM4noEyuNCF5ILRF6RpjPT6nQn/Nv8pqJUqXNU4SAbaor5i/NUuDogqsZUb1e mmq7L3khc5FBFtf4XdlecWVcO8Hcxv8aOk3rsZCwVZR0+ZTtxxZmJ1sw848lceu+KAU1 gYcnI1Dc1nWjnGDVGxzco4VkeeMWYLLs3pDTamUOOww41ThyPLEPUU8rPlWSdcO0392T O7bcsmeb86IpkrCX7v6ET1KMcRzv5G8n/fiqjXaLfUA/4xq9GprfMOJmKAnctdn+CFgg a0kYUTRgQw4YXJNFRgq898pwCYvdWQXtuI0Iitjr5ogdw8LcSr0D4G18lWq4K8drejmm pscg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=CmRWz5iS/me/RMqdnaDD894cfakp+jsL2NZ95UmiyHg=; fh=lrP63BWBZKfYuMjkqSujYI32B5ocvWnpGTOzPR8AA6w=; b=tf0JQ1wD7XaHhpVNofXBxOV10nQCtYlPpsYrgWnOlYoVd3f4z2EhEMTiSLwzHh7brw h0NGRM4yKx4qelHrL5tQPgdiNb4BJv2Psdmjr9/MUDwCAKwm3MWou1JjxW+SrfxlfU+0 tlg2GRmIB+zYANFpDbeUAIdjhKxiBZZAhlQgzU9saMQ753QS/qfOj83mIpwsSc6xUuG0 m7magfSneKuirG7JLJxffUXJWutXAPnMYanuynuFnEbDXoimyVgN8bTcYw+w1Pu63690 Ao2tLrwR1wEuS1cyTsHlHZMkp+RKAtXYCDEG7nmgAt+UhUjx6dDVgCjCjoTvhxSjaxQ+ jRoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=prEu3q2p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id u4-20020a17090341c400b001ca30930778si714235ple.71.2023.10.31.01.37.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 01:37:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=prEu3q2p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 3B261803E587; Tue, 31 Oct 2023 01:37:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235630AbjJaIh1 (ORCPT + 99 others); Tue, 31 Oct 2023 04:37:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235304AbjJaIhF (ORCPT ); Tue, 31 Oct 2023 04:37:05 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F87B1BD for ; Tue, 31 Oct 2023 01:36:02 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1cc316ccc38so17392735ad.1 for ; Tue, 31 Oct 2023 01:36:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698741361; x=1699346161; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=CmRWz5iS/me/RMqdnaDD894cfakp+jsL2NZ95UmiyHg=; b=prEu3q2poVTSVjwpaPZo6mX/hhi+J/9eh6896iU+t69PYT7sgiFwRiKMtn/sGQz5Yp 3A78cOa7ptNqhqjgW8wM/coB35JyveqVCWsLg4ZCZwpfLvQPqpTBE4mqqQj2GELAeEeN I17rzqljT2wjoWR6O5EQDtN5a4TleqGr7iBmuEPlUMQd15E08j9KpIVi7Xirk3DsU7x7 hTqCs/VU/WNvPyEPOFx9WQnS9iV6yTWg1FrcyLprVVLnlw1xX1DmwXSHAzbMne6c3L3h OJCnPq5I7ZPnuc2cO3HtMFOXlQn38PgTxnQBUf7AJvwL+O2euasULlD1Q8Ilgp+plwkh cRDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698741361; x=1699346161; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CmRWz5iS/me/RMqdnaDD894cfakp+jsL2NZ95UmiyHg=; b=W5E/J9jyQRFTsmjNlIama5estZdulLWRfudvaO68pF96VBQRe/8635k5NSw6f3Jozz hE5xBo26iAuRIZQo2AJT0+DyGi+CuVS69dfV5j5op85PX64TrzLvkkurRjb9/WEpEaHW vTlRnMCzWj4VzJ8lh0KCH1QWI3T8tM33TJS2Twjfl00TZtsmYYPZvjWzuPxFvEP0UXZL TnGSzum9zqlN5O/lrWSFYCTew4xb6OGUXuklNS0UwV5JIt68CTN20Cob7HyMXZKicKQw nKMQQ64PsWB/EQDCTcE0ALmED0wFQUPj7ax+jLumXcMvJsBZqVIsHB+DMigdv/+w/3Ki Koyw== X-Gm-Message-State: AOJu0Yzf1rRxRNBMOjVKQyeZ70QF3HHA5YtoEVV1axs6oEeblli/HrPU DVDkqjz5Uzb/phSoFc6hM3ve X-Received: by 2002:a17:902:d50f:b0:1cc:4e9f:d27 with SMTP id b15-20020a170902d50f00b001cc4e9f0d27mr4647477plg.1.1698741361293; Tue, 31 Oct 2023 01:36:01 -0700 (PDT) Received: from thinkpad ([117.193.215.92]) by smtp.gmail.com with ESMTPSA id u3-20020a17090282c300b001c74df14e6fsm781176plz.284.2023.10.31.01.35.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 01:36:00 -0700 (PDT) Date: Tue, 31 Oct 2023 14:05:53 +0530 From: Manivannan Sadhasivam To: Christophe JAILLET Cc: Xiaowei Song , Binghui Wang , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Jingoo Han , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH] PCI: kirin: Fix an error path in kirin_pcie_probe() Message-ID: <20231031083553.GD11778@thinkpad> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email 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 (howler.vger.email [0.0.0.0]); Tue, 31 Oct 2023 01:37:37 -0700 (PDT) On Mon, Oct 30, 2023 at 09:21:16AM +0100, Christophe JAILLET wrote: > If an error occurs after a successful kirin_pcie_power_on(), > kirin_pcie_power_off() should be called, as already done in the remove > function. > PERST# assert (gpio_id_dwc_perst) is missing from kirin_pcie_power_off(). So first you need to add that in a separate patch and then this patch can come next. Also, this driver is using legacy GPIO APIs and needs cleanup too (Kudos if you are willing to do that). - Mani > Fixes: fc5165db245a ("PCI: kirin: Add HiSilicon Kirin SoC PCIe controller driver") > Signed-off-by: Christophe JAILLET > --- > Not sure of the Fixes tag. > --- > drivers/pci/controller/dwc/pcie-kirin.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/drivers/pci/controller/dwc/pcie-kirin.c b/drivers/pci/controller/dwc/pcie-kirin.c > index 2ee146767971..0b93de9d2d06 100644 > --- a/drivers/pci/controller/dwc/pcie-kirin.c > +++ b/drivers/pci/controller/dwc/pcie-kirin.c > @@ -813,7 +813,15 @@ static int kirin_pcie_probe(struct platform_device *pdev) > if (ret) > return ret; > > - return dw_pcie_host_init(&pci->pp); > + ret = dw_pcie_host_init(&pci->pp); > + if (ret) > + goto err_power_off; > + > + return 0; > + > +err_power_off: > + kirin_pcie_power_off(kirin_pcie); > + return ret; > } > > static struct platform_driver kirin_pcie_driver = { > -- > 2.34.1 > -- மணிவண்ணன் சதாசிவம்