Message ID | 20190226194909.0e0c4758@xhacker.debian (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show
Return-Path: <linux-pci-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 058A21669 for <patchwork-linux-pci@patchwork.kernel.org>; Tue, 26 Feb 2019 11:56:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E64752B5E6 for <patchwork-linux-pci@patchwork.kernel.org>; Tue, 26 Feb 2019 11:56:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA1372B659; Tue, 26 Feb 2019 11:56:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C6F82B5E6 for <patchwork-linux-pci@patchwork.kernel.org>; Tue, 26 Feb 2019 11:56:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726478AbfBZL4U (ORCPT <rfc822;patchwork-linux-pci@patchwork.kernel.org>); Tue, 26 Feb 2019 06:56:20 -0500 Received: from mail-eopbgr750074.outbound.protection.outlook.com ([40.107.75.74]:48746 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726222AbfBZL4T (ORCPT <rfc822;linux-pci@vger.kernel.org>); Tue, 26 Feb 2019 06:56:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Synaptics.onmicrosoft.com; s=selector1-synaptics-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M48mEhrYZsVYb+OMxFVes8aHZ7bPq2vlD5rD5ZjYUUQ=; b=sxlw/3p0FasnpSOlxxGYsHc8vSGTnXNjpsQ+9mdlN6fLbnM2oFodxigBhboCwDBHPGF1jW7MrCU0KwaQplvVo0RmuDl3wu8rOY51SMtTCKcbAHsaBF0Rqnf+KiT17nTgCE9JEMWNxrtXNDcCmX/lNATNsaAPDKmpcPV3yThNeB8= Received: from BYAPR03MB4773.namprd03.prod.outlook.com (20.179.92.152) by BYAPR03MB4423.namprd03.prod.outlook.com (20.178.49.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.21; Tue, 26 Feb 2019 11:56:15 +0000 Received: from BYAPR03MB4773.namprd03.prod.outlook.com ([fe80::1cca:e5f5:d31d:1e5c]) by BYAPR03MB4773.namprd03.prod.outlook.com ([fe80::1cca:e5f5:d31d:1e5c%5]) with mapi id 15.20.1643.019; Tue, 26 Feb 2019 11:56:15 +0000 From: Jisheng Zhang <Jisheng.Zhang@synaptics.com> To: Jingoo Han <jingoohan1@gmail.com>, Gustavo Pimentel <gustavo.pimentel@synopsys.com>, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, Bjorn Helgaas <bhelgaas@google.com>, "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org> Subject: [PATCH 1/5] PCI: dwc: fix dw_pcie_free_msi() if msi_irq is invalid Thread-Topic: [PATCH 1/5] PCI: dwc: fix dw_pcie_free_msi() if msi_irq is invalid Thread-Index: AQHUzcpGhI7fWXBN+EyRjGP8KV1eAw== Date: Tue, 26 Feb 2019 11:56:15 +0000 Message-ID: <20190226194909.0e0c4758@xhacker.debian> References: <20190226194806.34fc23b5@xhacker.debian> In-Reply-To: <20190226194806.34fc23b5@xhacker.debian> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [199.33.119.15] x-clientproxiedby: TYAPR01CA0101.jpnprd01.prod.outlook.com (2603:1096:404:2a::17) To BYAPR03MB4773.namprd03.prod.outlook.com (2603:10b6:a03:134::24) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jisheng.Zhang@synaptics.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: de77967d-e309-401f-cd2a-08d69be168f3 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020);SRVR:BYAPR03MB4423; x-ms-traffictypediagnostic: BYAPR03MB4423: x-microsoft-exchange-diagnostics: 1;BYAPR03MB4423;23:Eb0Rxyb7tnesu+P6rXlOCLbepki1T2I+SrXun5MOLuTC3LRUPMQPdyXI5fCzBr0JDvQkbW7+o731wmxcoLkRlrzJJpUBzblLsWZGittJEBIIICpHkEeNqFhCwsZEvPoCbKYMqa/+SSXzFCCNAC/Do/5aPXuDNOU9hBLCCREnLHNAZ/uaipS3n6Db416QbtMX59uEBEbvu7WmqOfWBs/og74iNzxOvISimNN1rD8gLiTer2SxJoCR0b6FGnLvEzgCvmVWEHd+QgG63+0X6HBuN7mLaELGAEefdVvFiU1cfqfYbrZvdSBX8OCBTXbOqWZLyuScBOIguf3lLYiWY1jvvxO9japbSpMGHHoo3/nsN9oyxNEI1kZo8TxKl9bR+5Kx5XDAl5TDeoxSx0ga3mkBA47FsmbmWCgT9F+VUiVEdUYSY21ywevX6nkOFfFZPbFHBVqNzVVEJdWcyygVZRv7QY/nmzLpgsoL/RXurLNBfkh68N/M7x5hI+XqLyFmK4P4GL063fpMBVc1Vvds4NfbUK/lkTOCLr7n2qDmRKsnBpXnYNLqK7WGYmy5cnfp0WvCfzDsKyV5mBcHW0mbocsy2r/7WPRogasjT1t8NgPjdJhEBvShJ87GXcLWFRY2+9LJesR8b2oDxVg6xaleimXpSmRHmoefpGkq+UXKPibPuy1nqJd6Y3bT8JPKxQyoorMjcz8T/dWrGW6KeCti8j8TflHFOXMGFqpg3shg0QyHay0kes0Op7JTaII+CyIfpUfgYd8riXELfIHbRNhsLISZqrX34qWZ5wWu01xsX83m9HIy1bOV/WG9z2gQxitpKTa8D3LSZFPmzA1H4zQzzW8Nyu9wHquUHjdunSFNmmFgADp11CwQf4nfyWdzUZl2OjTa9Zt1uboZQK3VH5adCALNcEcmpn2lTaJ5PCqrH/1r0sR2/1K6JhXje5YA7pxfi+oKuo/68OeNFswJOZ74MO1FrNBt82IWXjWx+Eeg5qZE1FnDyY8kDFccUrKHGvxpiMF495wFwOI37kohqgHP/16lEzXjq713xhsLo3YLXr2X7HcpIc7pQ4GXGIgGHoN31AZa+as3V8rLnPpzzOC7bvYz3Cg4noBRuOCOJXdTSUmdJor9gyTyyc0Hed+XsAvv0uIF3htA3sGlh7lunmJ+239pnMhrnJP42Kjo/F3EkVLLuHq1k9fiTmDZqHMuMbLswBWfHZ/SdiY2EFqmIuva2mdjGC7BzLUFqAlGH5+BhYpYZ94= x-microsoft-antispam-prvs: <BYAPR03MB44235B15D981A483783BC2C7ED7B0@BYAPR03MB4423.namprd03.prod.outlook.com> x-forefront-prvs: 096029FF66 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(376002)(136003)(39860400002)(366004)(396003)(199004)(189003)(81166006)(106356001)(50226002)(6506007)(81156014)(6116002)(386003)(102836004)(305945005)(26005)(7736002)(97736004)(99286004)(3846002)(8676002)(76176011)(52116002)(68736007)(478600001)(2906002)(8936002)(72206003)(105586002)(110136005)(25786009)(316002)(66066001)(9686003)(6436002)(86362001)(486006)(2201001)(6512007)(2501003)(5660300002)(476003)(53936002)(256004)(6486002)(14454004)(186003)(4744005)(1076003)(71200400001)(71190400001)(11346002)(446003)(39210200001);DIR:OUT;SFP:1101;SCL:1;SRVR:BYAPR03MB4423;H:BYAPR03MB4773.namprd03.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:0;MX:1; received-spf: None (protection.outlook.com: synaptics.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: g4206jVa/1oP3Eo8XBPkfW4pHPH2T2A2dPuq2UiCjK5wjBurZ0NEtmxvFKh6EjBF+T13ZA06ZDcAxuhykMw1cczFwpGjcV7Tubhs0Oo2oMjZq0ElJ+KqAmL7YTioVNOdwhBJ38zUjYnjMcnLQ6p2T6hbiskI9bYDf4msmqDZaQVfq2ZpohJzbd/96tOxBKcrmwR9BoPVz9+EbSL01LnUuNu/l5GKhhz34tSBz/XJwImMuLfNRy+YFTTMMJJRhuTAJLJdWYvY6t0Dpml+VIOuOxhHrl2M9yHuSNBHxftlKD1sttXFHuQTMbnVojeiaBXFd8NrsijLhKy5Xy5cSjkkxlsTAh6kIWL/vayAkWPs3BWK4tfkFZbTt4rqW+8rGw6G0bG7iN9gwHkB/r+fqDjMEeW8BP6QWsDiSG95fIh4qzQ= Content-Type: text/plain; charset="us-ascii" Content-ID: <F80E6339A3181349AE350F5D27DAE035@namprd03.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: synaptics.com X-MS-Exchange-CrossTenant-Network-Message-Id: de77967d-e309-401f-cd2a-08d69be168f3 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Feb 2019 11:56:12.9684 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 335d1fbc-2124-4173-9863-17e7051a2a0e X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR03MB4423 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: <linux-pci.vger.kernel.org> X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
PCI: dwc: support remove
|
expand
|
diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c index 0c18ab63811f..a94d3530b694 100644 --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -298,8 +298,10 @@ int dw_pcie_allocate_domains(struct pcie_port *pp) void dw_pcie_free_msi(struct pcie_port *pp) { - irq_set_chained_handler(pp->msi_irq, NULL); - irq_set_handler_data(pp->msi_irq, NULL); + if (pp->msi_irq) { + irq_set_chained_handler(pp->msi_irq, NULL); + irq_set_handler_data(pp->msi_irq, NULL); + } irq_domain_remove(pp->msi_domain); irq_domain_remove(pp->irq_domain);
we should check msi_irq before calling irq_set_chained_handler() and irq_set_handler_data(). Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com> --- drivers/pci/controller/dwc/pcie-designware-host.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)