From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757713AbdAKK1G (ORCPT ); Wed, 11 Jan 2017 05:27:06 -0500 Received: from foss.arm.com ([217.140.101.70]:45376 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753092AbdAKK1E (ORCPT ); Wed, 11 Jan 2017 05:27:04 -0500 From: Marc Zyngier To: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Sebastian Andrzej Siewior , Duc Dang , Bjorn Helgaas , Thomas Gleixner Subject: [PATCH] PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration handling Date: Wed, 11 Jan 2017 10:26:47 +0000 Message-Id: <1484130407-24707-1-git-send-email-marc.zyngier@arm.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The conversion to the new hotplug state machine introduced a regression where a successful hotplug registration would be treated as an error, effectively disabling the MSI driver forever. Fix it by doing the proper check on the return value. Fixes: 9c248f8896e6 ("PCI/xgene-msi: Convert to hotplug state machine") Cc: Sebastian Andrzej Siewior Cc: Duc Dang Cc: Bjorn Helgaas Cc: Thomas Gleixner Cc: stable@vger.kernel.org Signed-off-by: Marc Zyngier --- drivers/pci/host/pci-xgene-msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/host/pci-xgene-msi.c b/drivers/pci/host/pci-xgene-msi.c index 1f38d08..f1b633b 100644 --- a/drivers/pci/host/pci-xgene-msi.c +++ b/drivers/pci/host/pci-xgene-msi.c @@ -517,7 +517,7 @@ static int xgene_msi_probe(struct platform_device *pdev) rc = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "pci/xgene:online", xgene_msi_hwirq_alloc, NULL); - if (rc) + if (rc < 0) goto err_cpuhp; pci_xgene_online = rc; rc = cpuhp_setup_state(CPUHP_PCI_XGENE_DEAD, "pci/xgene:dead", NULL, -- 2.1.4