diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-06-02 22:08:39 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-06-05 07:11:47 -0400 |
commit | a98d4f64a20b2b88697e7e08c871144a7e3f0ec4 (patch) | |
tree | 1107c02d00d96c24df3cbb3f69622e4631cfdeaa /drivers/acpi | |
parent | 780a6ec640a3fed671fc2c40e4dd30c03eca3ac3 (diff) |
ACPI / APEI: fix error return code in ghes_probe()
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 <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/apei/ghes.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index d668a8ae602b..ea750ed7c264 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c | |||
@@ -917,13 +917,14 @@ static int ghes_probe(struct platform_device *ghes_dev) | |||
917 | break; | 917 | break; |
918 | case ACPI_HEST_NOTIFY_EXTERNAL: | 918 | case ACPI_HEST_NOTIFY_EXTERNAL: |
919 | /* External interrupt vector is GSI */ | 919 | /* External interrupt vector is GSI */ |
920 | if (acpi_gsi_to_irq(generic->notify.vector, &ghes->irq)) { | 920 | rc = acpi_gsi_to_irq(generic->notify.vector, &ghes->irq); |
921 | if (rc) { | ||
921 | pr_err(GHES_PFX "Failed to map GSI to IRQ for generic hardware error source: %d\n", | 922 | pr_err(GHES_PFX "Failed to map GSI to IRQ for generic hardware error source: %d\n", |
922 | generic->header.source_id); | 923 | generic->header.source_id); |
923 | goto err_edac_unreg; | 924 | goto err_edac_unreg; |
924 | } | 925 | } |
925 | if (request_irq(ghes->irq, ghes_irq_func, | 926 | rc = request_irq(ghes->irq, ghes_irq_func, 0, "GHES IRQ", ghes); |
926 | 0, "GHES IRQ", ghes)) { | 927 | if (rc) { |
927 | pr_err(GHES_PFX "Failed to register IRQ for generic hardware error source: %d\n", | 928 | pr_err(GHES_PFX "Failed to register IRQ for generic hardware error source: %d\n", |
928 | generic->header.source_id); | 929 | generic->header.source_id); |
929 | goto err_edac_unreg; | 930 | goto err_edac_unreg; |