Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758589AbcLAHm1 (ORCPT ); Thu, 1 Dec 2016 02:42:27 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:5752 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758528AbcLAHmZ (ORCPT ); Thu, 1 Dec 2016 02:42:25 -0500 From: Majun To: , , , , , , , , , , CC: , , Subject: [PATCH] ACPI: fix the process flow for 0 which return from acpi_register_gsi Date: Thu, 1 Dec 2016 15:41:47 +0800 Message-ID: <1480578107-12512-1-git-send-email-majun258@huawei.com> X-Mailer: git-send-email 1.9.5.msysgit.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.249.226] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 752 Lines: 26 From: MaJun The return value 0 from acpi_register_gsi() means irq mapping failed. So, we should process this case in else branch. Signed-off-by: MaJun --- drivers/acpi/resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index 56241eb..9918326 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -416,7 +416,7 @@ static void acpi_dev_get_irqresource(struct resource *res, u32 gsi, res->flags = acpi_dev_irq_flags(triggering, polarity, shareable); irq = acpi_register_gsi(NULL, gsi, triggering, polarity); - if (irq >= 0) { + if (irq > 0) { res->start = irq; res->end = irq; } else { -- 1.7.12.4