From patchwork Thu Oct 21 02:50:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li Chen X-Patchwork-Id: 12573657 X-Patchwork-Delegate: lorenzo.pieralisi@arm.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5F81C433F5 for ; Thu, 21 Oct 2021 02:58:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4C24611CC for ; Thu, 21 Oct 2021 02:58:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230285AbhJUDA6 (ORCPT ); Wed, 20 Oct 2021 23:00:58 -0400 Received: from mx0a-00622301.pphosted.com ([205.220.163.205]:59244 "EHLO mx0a-00622301.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230103AbhJUDA6 (ORCPT ); Wed, 20 Oct 2021 23:00:58 -0400 X-Greylist: delayed 488 seconds by postgrey-1.27 at vger.kernel.org; Wed, 20 Oct 2021 23:00:58 EDT Received: from pps.filterd (m0241924.ppops.net [127.0.0.1]) by mx0a-00622301.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19L1peBW002474; Wed, 20 Oct 2021 19:50:24 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ambarella.com; h=from : to : cc : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=com20210415pp; bh=n/38vW33hgZ6Mn76dP60GwXHA3a3aEyHbO5WGUAmrJY=; b=JfNTTx1XJ+XM1zN66OLuxz8ELIypOsYZQuS3kEQFjS1gpEgbrInAGaxRBbo1hQle+Jkj wbT7HDi1L1KyLg7jsdiiyWvskUbIiv9P9pxJtJtFvOsHsUsPuMp82UY3SO4BEn/Kidi8 oJE+dSYL6GMsNmlmHhWTIC1maY1fVsd8BNwGt32HJdXA4U9O1rpYh5E4EXa8ivsDXh2Z gQTFZpal+lpPI4IVkG1KhRgan+6Tt5l6FQucdRKiSQwm13U0sW2W+VJCFs1fTM6zReuK KQIQB4f4+nMdeSyFYF7eyDz+/vyowNr1UvcMh/DPzEr72pDtTVcndap7N/YezDX8HLKG kA== Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2109.outbound.protection.outlook.com [104.47.70.109]) by mx0a-00622301.pphosted.com with ESMTP id 3btneb88sg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Oct 2021 19:50:23 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iBmOaIah3qPWICJ7JNB3FEmHPOHv0XXX8eDPhdSI9v1/CUc9KxRGJj8fUMvBvQomHnfAERllYlcyMLrXDFegBuxxNZuCdcaZ5SOnD+H9FguUVGB0dFMGcXsH5MGO5aq66guKY7YiduCLZG1h3vEMYQpWjnkXxUdQgi4xuO1OUIz9/shH/X+qI7u/0ZzBYv96QS5gOFtzaQtx21oIdUppskBQe+H4xNh0E1UJgS0EMoYJFlZZ57qXvMNTasNehcqanii0pExweVmJYfe90NMxqwr6us/5/31/nslxt8U2vqU8jOWyMJp+xyCxNHtVPz19FGMeP7sxcLJKUsN4QOcyuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AjX/2C2E2gATfztiAKi6cjOzhWZU29a4kzacng/sjxw=; b=WCEuOllhAbq02SamqiOUojN2bk+lhvCHDGsxcXb9/i2SYVZikhDQZrI1TpHzhNLF7emwOpEg4SkNS2magj1kBADYMey98CEW+nleh8MbuTj/MBJQDmgTl6cJes93wCGHDTz0YHHheVWbGSw0rgiM3FiJWzZDC700aHdP6kDdb1/PW1v3R9zREdSvpTMGE21hMz3c+dt1qsglNo+TFizXGGTELLzBo/QS3t0QtFMA9UQbT8vwJP07VJIlCbwo4RTMFdEi1nAHhx+P1vcgYU71yI0Zk9UmgxLleZq5nq9I038i1rlq4683h6cIURSp6hw/C8ek1q2mL+Z+JMfRo0mEaQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ambarella.com; dmarc=pass action=none header.from=ambarella.com; dkim=pass header.d=ambarella.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ambarella.onmicrosoft.com; s=selector1-ambarella-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AjX/2C2E2gATfztiAKi6cjOzhWZU29a4kzacng/sjxw=; b=ZCmnjYg2iy5eCk46Kz4ZIXl2McL2xSjtXgNvrjIQa7U+RYSOCI2E7Aq4/qPEp/UzjBD9Jy39IlD9acoWZ5CTTpALmxGCxpviZUInqTl3nfW7birgWifHDy0bTgtGvvU02kZfJoINxkW5LD+w0RFUzJlmiAEQQd14cSXBd9MpPus= Received: from DM6PR19MB4027.namprd19.prod.outlook.com (2603:10b6:5:248::20) by DM5PR19MB1228.namprd19.prod.outlook.com (2603:10b6:3:b1::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.18; Thu, 21 Oct 2021 02:50:20 +0000 Received: from DM6PR19MB4027.namprd19.prod.outlook.com ([fe80::29e3:491b:caaa:8cef]) by DM6PR19MB4027.namprd19.prod.outlook.com ([fe80::29e3:491b:caaa:8cef%4]) with mapi id 15.20.4608.018; Thu, 21 Oct 2021 02:50:19 +0000 From: Li Chen To: Bjorn Helgaas CC: Tom Joseph , Lorenzo Pieralisi , Rob Herring , "kw@linux.com" , Bjorn Helgaas , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH v2] PCI: cadence: Add missing return in cdns_plat_pcie_probe() Thread-Topic: [PATCH v2] PCI: cadence: Add missing return in cdns_plat_pcie_probe() Thread-Index: AdfGJXsneGNhzEUJSnSJFpIT3qRvIQ== Date: Thu, 21 Oct 2021 02:50:19 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=ambarella.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 98f4c2f2-57be-4e8f-43e1-08d9943d8549 x-ms-traffictypediagnostic: DM5PR19MB1228: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1148; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: j6K3ESdjmACEnf0/Qeq0pMrEyYkGOy+kjSWwtsGaj3qYB8dlvVR3kT70VVxz6UG0j7XFcBcCgT+9qIbcncktCH6+7/v5QrqsEJVrjM4VKu2T0hoz6zfEVIp7Fr/GBIJ4A6rSY1zS8qIiNulpYBCxpB3/+Cnfc64dhEboDixisBe0Dz2n9Gwi5Lu6MU20at+pZjb6dqBEEyJgANDmRP1Oj3nj+m8H2pfE79KZy8A2KLz07oP7BY3BMJ6nLiHehViPTIAnTHElTzo/d4I1g3WZW1/o9Crl7SWIKQ65C46l+1tAmhYPkwCTCHbO+C925wK3rw+ZB5XJHjgCg4M0fYDjYfKlUFM1Oqp8bIaDpJUu7cWsgjgjfx4Ya/3KJq3GpzMo7as2AXKx6equzdbEJtzNurTY2330jJhCAtqHy4PUCuJi3qElyt/VE3D4CQfdyhR1PkHz9uzbuZtFmcAg7KvYd/PMkYgkBoCEgJvs/BtNULZCXsIxfV2HS6BffiPmUQ01PSVhJRBEf58+/pHa4sN1p+hBeWir+ZXNN/r6+2/9utMNbXxn2xGUxQE1JiUG9lTyCjus6QgzrzZkbpryLr/EkrgJ+74KFzyp7BfBy2v4QfBNHtpy8V4ikX6HqA0qZqgVTnSA1JQC1O969VFTIfm4oQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR19MB4027.namprd19.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(122000001)(54906003)(8936002)(4326008)(66446008)(64756008)(66556008)(66476007)(6916009)(8676002)(5660300002)(2906002)(33656002)(66946007)(71200400001)(86362001)(186003)(316002)(38100700002)(4744005)(52536014)(55016002)(9686003)(508600001)(26005)(7696005)(6506007)(88996005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: d58t3fffoAii28bbOcJHkf7kJAjnjNactOOWnMGWAt9Yn28TTlAwnU7+9DsxeElnxUsZEp4S62ZxPaMJR2cXWXh5UnBOKQOnsiCggjKwsUQ/XWgAGOAKT9XO15zqNpRQOt7PP+I8cxpbTWdiFrnH+wbA+F4MzW5SEVbFvKp+dhdJrgnjRxwzziBI4XGxKPezj9b9Kl6IOojXLu75tTwt/cGiRB6YJVIvZ+R//SZ5chAJ+Ot7t5zmvWLnHdB52g9EbVRq+KOhuzSCpQGNZJ3RStxcXeL4CD2BJ7MCF29oIhAZ2i1Rre0pjAbg6Q9TClWGqirNn+OJgHbOf+nm1Pphu1eB54YScuZ8qLVJMvHOmpDPwCrcbw7BnyxEHD9piyRVf1Gym4yyHfu/L5IAkoBa1pIcB5BxXfvzJI2ArZyfOFfqQFrppup2uaMMSuLIa+pkvkXCqMKOdFaH1Vn1o86lOYhZ0tgl0vbJXA9m7DIOSpz2d4DeamH1x1fvWECCdQsWw17sDkVRMsBLaVT8iTMDETgMH47Zi91Y3TgVhezyWbKwyd0gKyaLeQsKuJJevJbzj6zYtemdG7nQboIP+frxToNZhDBEEWH3FpzH6KfYcY9UpsPL7GJvoCGdxMI7FjPrnxicmY8jUDnOceMCGzUm/8UD8QTP1alWIR74x3sOVLJqtvih/QxFOMn0+rqjvbcnmNyXJC5Oc3k6nM9dUiUYbBhE5uCXCog+wJhDQmHkBZFj066h6awzY8WMLL93FepW5mQBX2LIlgqNOYlQMNh8zb/vhhpKD23TKR8QXNJNJu/y3Af77aFx9+s2gmBqd2EegJ56suUjaDvIasb2NR2qXW5de7VvdoktfbGSAmGRg8VYm6lAaS1qqqV/SOWfFk999vhebs5JJle8NI0bTKBdo7KgjpTXbze2PTuO7bXa2yfjkoGPR9eDI6frk24xYG9JYozMvc1Jb/XEYHBfWT4xV2Ytu7zNU7kLpHcQuJrvlq/VNjvAeRbPa41Kgzu3xY7HT0QacBx5Jb+XLfos7dR9yeVnLxjVF1X8eFLJg/D1Im0/V1ZaNm44c4vhKnJlIODyxkiO6Y5hlnP5bp7LfkxsKDn0FYEcgUFci8Bklq+hkAtM5A/QS6qv/3oN0NHC31URmAMQVgYO/yB83eP0wQbc5qWdGb8+WEOk0IctbI2y+YuyYCyF9pIUt26tY1qIUiBJUC9fn7UK9ff0KECP1Rh4ivSvBX1LQVLHnb1ee42C5doTauN/eKvlypmasA8djXO1yIhOqNp5WBdanZgM3HaeHou2LdSx44JF4B0xj9Ayqy+oiTsf5mcZ4uEKLEwO+WXn x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: ambarella.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR19MB4027.namprd19.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 98f4c2f2-57be-4e8f-43e1-08d9943d8549 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Oct 2021 02:50:19.7084 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3ccd3c8d-5f7c-4eb4-ae6f-32d8c106402c X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: lchen@ambarella.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR19MB1228 X-Proofpoint-ORIG-GUID: Pk_BHD4gIWaJN-rEml9dDz17GvY0fB_F X-Proofpoint-GUID: Pk_BHD4gIWaJN-rEml9dDz17GvY0fB_F X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-20_06,2021-10-20_02,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 clxscore=1011 mlxlogscore=999 priorityscore=1501 adultscore=0 bulkscore=0 spamscore=0 impostorscore=0 mlxscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110210011 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org When cdns_plat_pcie_probe() succeeds, return success instead of falling into the error handling code. Signed-off-by: Xuliang Zhang Reviewed-by: Bjorn Helgaas Fixes: bd22885aa188 ("PCI: cadence: Refactor driver to use as a core library") Cc: stable@vger.kernel.org Signed-off-by: Li Chen Acked-by: Tom Joseph --- drivers/pci/controller/cadence/pcie-cadence-plat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/controller/cadence/pcie-cadence-plat.c b/drivers/pci/controller/cadence/pcie-cadence-plat.c index 5fee0f89ab59..a224afadbcc0 100644 --- a/drivers/pci/controller/cadence/pcie-cadence-plat.c +++ b/drivers/pci/controller/cadence/pcie-cadence-plat.c @@ -127,6 +127,8 @@ static int cdns_plat_pcie_probe(struct platform_device *pdev) goto err_init; } + return 0; + err_init: err_get_sync: pm_runtime_put_sync(dev);