Message ID | 20190226194909.0e0c4758@xhacker.debian (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 7566515AC for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 26 Feb 2019 11:56:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C5572B5C3 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 26 Feb 2019 11:56:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F5A72B606; Tue, 26 Feb 2019 11:56:49 +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=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EB6732B5C3 for <patchwork-linux-arm@patchwork.kernel.org>; Tue, 26 Feb 2019 11:56:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-ID:In-Reply-To: References:Message-ID:Date:Subject:To:From:Reply-To:Cc:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hPkHOpfHjk/Tm+ZCDPHlDVgEFXSDHdtAo09jVBjBiJ8=; b=Npe52ujIXBcUR7 k0lUoiIuM017oex4lIV/dCoxhF6RUcnenj0kZPNju6dXfX1pvOJhjsun9HbrnQR2Z4KNB3pdOZOva 2Vz36lebpF6X8cpiI9m0q3vlNfpn/GaoXVvlRv24oPi7lzk7zj7BEgDIHmvxY1hw9e/IMK2Ddt+/w sPxKsdhCCInHmvaRL6rMwBunSwwnuiF8Dni/Z8zPv1o52HY/bll3ooYxIY5jwmTH2ahZt3+LYj0cX nre8Zph8CaNqObiI/iq1G22WQPpS3vllP3XmcG0oohaWtddLrrU1z/JTWVyStwT44vptljiBrIanb qqO0clgejx9Z/z4GP7Hg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gybLj-0002Hv-Hq; Tue, 26 Feb 2019 11:56:39 +0000 Received: from mail-eopbgr750040.outbound.protection.outlook.com ([40.107.75.40] helo=NAM02-BL2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gybLO-0001ze-FV for linux-arm-kernel@lists.infradead.org; Tue, 26 Feb 2019 11:56:22 +0000 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: =?us-ascii?Q?1; BYAPR03MB4423; 23:Eb0Rxyb7tnesu+P6rXlOCLbepki1T2I+SrXun5MOL?= uTC3LRUPMQPdyXI5fCzBr0JDvQkbW7+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-ID: <F80E6339A3181349AE350F5D27DAE035@namprd03.prod.outlook.com> 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190226_035620_751606_0335897C X-CRM114-Status: UNSURE ( 9.99 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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(-)