Received: by 10.223.185.116 with SMTP id b49csp5959832wrg; Wed, 7 Mar 2018 22:41:25 -0800 (PST) X-Google-Smtp-Source: AG47ELslarxzz3/KVhdHvL1XhpkOQ3Kw1Rkpn7AuJccwjJ+izaF6A+faMJ9OLStkX3ssrl8ogeNV X-Received: by 2002:a17:902:5a88:: with SMTP id r8-v6mr23821998pli.426.1520491285053; Wed, 07 Mar 2018 22:41:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520491285; cv=none; d=google.com; s=arc-20160816; b=mFX38rMVA4r3UDRQpdsR5uc32/+a0uc4asD6GB4xRYPWa0rrsgukPNAvz9eRRa3M9u ILVBQye5lMfDC2/LK/ajny6K7PfapPKeGFy3cHdqF5WLepS66feWraoxWh9WGF3wVzLL E1pKborvvz1UW2Vk4VNseaiXzBhYqBp6IgkrJvidsmH8SFqKMfwHenWKedwQj4PXgbco 2wtYjSIIT0oSyn3DN98wqdW7QjMyDZX9RSI6NebwrNVIEhPU5a/6KDS5/McPBe+oJq69 9pFOz35EqdW3a1kmfQ0jIZAxDylwOJJ5Ye0Ozdp92Vcvh0cxCCx71pypIxnr0lkeg+tj TzUQ== 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=LslsYJ1g8cVmDjos65r5rKHvjsRX3Kgs7yx4DRrLDBU=; b=BagYBn80Q6AsiztZhkPLkdR+RqE5Qk5mTIeQydt1e4EpUfan8PMxyu8ud3GQ73J/qa ltV4rgsk1pCJASZqjtMiLLcR78STFaLkzZNJ/WcgPIyB4NbHoYI3KykQ8I3ewW5Dyp4Y XNWV2bLPVBrGD8m7wPAEYWHThejeFjTIt4xUybvGodFIxoqUfvm6t01VDuWAYfdpgeJZ R7kXozphpmoHtTlKNTRSLFrqXsl9oJiv9zLMobEHWTPBWKIZneLAbVS40XDBXTJKj7FH R9YZJaUXMOteetdeYfD/BacIwm1HK9/jznRaLNFzNrzlBynPZojPqdpnwhcxq6UatWiM 75CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=ZTQ6mNGa; 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 c13-v6si14150752plo.537.2018.03.07.22.41.10; Wed, 07 Mar 2018 22:41:25 -0800 (PST) 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=ZTQ6mNGa; 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 S935041AbeCHGkK (ORCPT + 99 others); Thu, 8 Mar 2018 01:40:10 -0500 Received: from mail-sn1nam01on0106.outbound.protection.outlook.com ([104.47.32.106]:14491 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965311AbeCHE7J (ORCPT ); Wed, 7 Mar 2018 23:59:09 -0500 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=LslsYJ1g8cVmDjos65r5rKHvjsRX3Kgs7yx4DRrLDBU=; b=ZTQ6mNGa2jfjt0cFhf9RbZoiJXjwTH4v2bNO0IwMjahAqjeu6+mdfZ5HTmEIBVORWi62ekVwbCiLActyoj2kqJu6lFYuR/CF/Gu1fQv/t0pLJoHHzarquIZGQLW1aE6JF7dGrGRgrK8wR/6aBeRuhyCsEoW8PHI5r0YBlxCCVes= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1015.namprd21.prod.outlook.com (52.132.133.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.3; Thu, 8 Mar 2018 04:59:07 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0588.008; Thu, 8 Mar 2018 04:59:07 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Geert Uytterhoeven , Lorenzo Pieralisi , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 48/67] PCI: rcar: Handle rcar_pcie_parse_request_of_pci_ranges() failures Thread-Topic: [PATCH AUTOSEL for 4.14 48/67] PCI: rcar: Handle rcar_pcie_parse_request_of_pci_ranges() failures Thread-Index: AQHTtpoDyqETKx57kk6K9u5L3g1rfA== Date: Thu, 8 Mar 2018 04:57:52 +0000 Message-ID: <20180308045641.7814-48-alexander.levin@microsoft.com> References: <20180308045641.7814-1-alexander.levin@microsoft.com> In-Reply-To: <20180308045641.7814-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;DM5PR2101MB1015;7:4v1UYP9s2/uxGD4PErhE6AwzOPVrxqnrJnLH3XBBM39+St2Kw2vB1QVWYtIEz5sajLfIJAu8kcePEVT9bTdlKFSOBPmE1gjT9GM9GuokfgohkAGhp4tapnyW/WETGhIpnVwH23nzSSCJuYcHMCJcveNS+6UbsiF82B08fAqL5w66o+H5N2h3qZpEZGlC0I8cACQJ34E2gu5+ZwVUF1ytMgy71qP29Pb68Naw8XRT/Bm8XEGcEV2dalD7abMzYpNP;20:pOtZ7YpZ81qYZ1Nes9xAanY/Oo2uG4/oHEofjVsk4NV9pUhcD3kkBKTodDh3TMZ2Oi79FS2kHBP+KvDWYLklmGdzn4YnpkVCkn5nGo95lopAVmLJ0Wy8la7TVelS3LIqMPhlsx+HG9vxZfc/02GIVPOEpGs0wuPp8H5WPCjMSMA= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: eb715a45-5d2f-4207-e684-08d584b15289 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1015; x-ms-traffictypediagnostic: DM5PR2101MB1015: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(180628864354917)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231220)(944501244)(52105095)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041288)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:DM5PR2101MB1015;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1015; x-forefront-prvs: 060503E79B x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(396003)(366004)(39860400002)(39380400002)(346002)(189003)(199004)(6116002)(53936002)(1076002)(107886003)(3846002)(3660700001)(10090500001)(6666003)(2950100002)(2906002)(6512007)(99286004)(8936002)(6486002)(76176011)(6506007)(68736007)(59450400001)(316002)(110136005)(81156014)(81166006)(8676002)(54906003)(3280700002)(2900100001)(6436002)(97736004)(72206003)(25786009)(10290500003)(86612001)(4326008)(305945005)(7736002)(66066001)(22452003)(478600001)(5660300001)(86362001)(14454004)(106356001)(36756003)(102836004)(5250100002)(105586002)(26005)(2501003)(186003)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1015;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: AP8mPPrnMzaqkLH1lsr+RZPEDpksWapcCme6r6lG3kZztErTJ0xX3alSbpiX8+R/fniWMekS1xSH1Hjz15VwlM4GYordf0G4FoWck8Cgew4oKfg5F8KVAsHb+b+1RHwz+psvLn9kZIQhRxlkglvm/ZBTEEjVRaYaQOhplPPA9KzLbrEURizlKmFP1pdIE/t2U241x/TfGiuxjABz6H71r2l9MlwQxP4xT1/xeS+49wbpBmHSc3dw1Qy+Cyj5BKr8Wq7U0oTy46p33m/lunnHD4mC7aV+dJbR6eDZFO/usOz6FEkim/66IHmh0JyRkGfmLD5ENbYz9JgSYeiUqGJO0Q== 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: eb715a45-5d2f-4207-e684-08d584b15289 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2018 04:57:52.4514 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1015 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Geert Uytterhoeven [ Upstream commit 83c75ddd816e979802bd244ad494139f28152921 ] rcar_pcie_parse_request_of_pci_ranges() can fail and return an error code, but this is not checked nor handled. Fix this by adding the missing error handling. Fixes: 5d2917d469faab72 ("PCI: rcar: Convert to DT resource parsing API") Signed-off-by: Geert Uytterhoeven Signed-off-by: Lorenzo Pieralisi Signed-off-by: Sasha Levin --- drivers/pci/host/pcie-rcar.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c index f09ff4789bb5..8f44a7d14bff 100644 --- a/drivers/pci/host/pcie-rcar.c +++ b/drivers/pci/host/pcie-rcar.c @@ -1141,7 +1141,9 @@ static int rcar_pcie_probe(struct platform_device *pd= ev) =20 INIT_LIST_HEAD(&pcie->resources); =20 - rcar_pcie_parse_request_of_pci_ranges(pcie); + err =3D rcar_pcie_parse_request_of_pci_ranges(pcie); + if (err) + goto err_free_bridge; =20 err =3D rcar_pcie_get_resources(pcie); if (err < 0) { @@ -1196,6 +1198,7 @@ static int rcar_pcie_probe(struct platform_device *pd= ev) =20 err_free_resource_list: pci_free_resource_list(&pcie->resources); +err_free_bridge: pci_free_host_bridge(bridge); =20 return err; --=20 2.14.1