From patchwork Mon Jun 3 02:08:39 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 2650451 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 9943540232 for ; Mon, 3 Jun 2013 02:08:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756721Ab3FCCIl (ORCPT ); Sun, 2 Jun 2013 22:08:41 -0400 Received: from mail-bk0-f47.google.com ([209.85.214.47]:38419 "EHLO mail-bk0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755363Ab3FCCIl (ORCPT ); Sun, 2 Jun 2013 22:08:41 -0400 Received: by mail-bk0-f47.google.com with SMTP id jg9so1249933bkc.34 for ; Sun, 02 Jun 2013 19:08:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=HCVmQWCj3UPvaZRFrRMJhtuzKU1OqdDdXkTBiT+IS0Y=; b=07ASGCztnlUsxEQ5ym0Y+yYFdiXmI4jp3X6dfdiNz6DorH52k9CilXM9mfrrWJnfnw /BMPrO6nCUeGXy2w9shDBQ/xBi0p8JcWaDZrZlV0rFGYggSXUUmsnFpt6KjKfN4eWHQm /hhAeMe+eYA1H7SdudVNM5opOP78+KeuYA18mfLJcl7OYc2mKEl6C7CISiCoqIGEVYVK H1ykyuIFpCRUYfABDRFFaaYl2rcWsBNmYTWw3ZRbO7x1zqJUxCsS1GxrpFWHifR29tOH 8pj6lFGXPJA2gYFQ0hIWBPpciCbU6CLZEwVuEGO5RMP8mYP/fpCeiRex1482HZ23/Bmv Tx+A== MIME-Version: 1.0 X-Received: by 10.205.26.9 with SMTP id rk9mr5925843bkb.39.1370225319682; Sun, 02 Jun 2013 19:08:39 -0700 (PDT) Received: by 10.204.39.1 with HTTP; Sun, 2 Jun 2013 19:08:39 -0700 (PDT) Date: Mon, 3 Jun 2013 10:08:39 +0800 Message-ID: Subject: [PATCH] ghes: fix error return code in ghes_probe() From: Wei Yongjun To: lenb@kernel.org, rjw@sisk.pl, ying.huang@intel.com, wfp5p@virginia.edu, mchehab@redhat.com, gregkh@linuxfoundation.org Cc: yongjun_wei@trendmicro.com.cn, linux-acpi@vger.kernel.org Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Wei Yongjun Fix to return a negative error code in the acpi_gsi_to_irq() and request_irq() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Reviewed-by: Huang Ying --- drivers/acpi/apei/ghes.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 403baf4..fcd7d91 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -919,13 +919,14 @@ static int ghes_probe(struct platform_device *ghes_dev) break; case ACPI_HEST_NOTIFY_EXTERNAL: /* External interrupt vector is GSI */ - if (acpi_gsi_to_irq(generic->notify.vector, &ghes->irq)) { + rc = acpi_gsi_to_irq(generic->notify.vector, &ghes->irq); + if (rc) { pr_err(GHES_PFX "Failed to map GSI to IRQ for generic hardware error source: %d\n", generic->header.source_id); goto err_edac_unreg; } - if (request_irq(ghes->irq, ghes_irq_func, - 0, "GHES IRQ", ghes)) { + rc = request_irq(ghes->irq, ghes_irq_func, 0, "GHES IRQ", ghes); + if (rc) { pr_err(GHES_PFX "Failed to register IRQ for generic hardware error source: %d\n", generic->header.source_id); goto err_edac_unreg;