Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1562006
| From | Andy Shevchenko <andriy.shevchenko@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 3/3] x86/platform/intel-mid: Don't shadow error code of mp_map_gsi_to_irq() |
| Date | 2017-01-18 18:50 +0100 |
| Message-ID | <t12wW-72O-33@gated-at.bofh.it> (permalink) |
| References | <t12wV-72O-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
When call mp_map_gsi_to_irq() and return its error code do not shadow it.
Note that 0 is not an error.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c
index 3f1f1c77d090..8a10a56f2840 100644
--- a/arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c
+++ b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c
@@ -28,9 +28,9 @@ static struct platform_device wdt_dev = {
static int tangier_probe(struct platform_device *pdev)
{
- int gsi;
struct irq_alloc_info info;
struct intel_mid_wdt_pdata *pdata = pdev->dev.platform_data;
+ int gsi, irq;
if (!pdata)
return -EINVAL;
@@ -38,10 +38,10 @@ static int tangier_probe(struct platform_device *pdev)
/* IOAPIC builds identity mapping between GSI and IRQ on MID */
gsi = pdata->irq;
ioapic_set_alloc_attr(&info, cpu_to_node(0), 1, 0);
- if (mp_map_gsi_to_irq(gsi, IOAPIC_MAP_ALLOC, &info) <= 0) {
- dev_warn(&pdev->dev, "cannot find interrupt %d in ioapic\n",
- gsi);
- return -EINVAL;
+ irq = mp_map_gsi_to_irq(gsi, IOAPIC_MAP_ALLOC, &info);
+ if (irq < 0) {
+ dev_warn(&pdev->dev, "cannot find interrupt %d in ioapic\n", gsi);
+ return irq;
}
return 0;
--
2.11.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 0/3] x86/platform/intel-mid: Fix RTC handling Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-18 18:50 +0100
[PATCH v3 3/3] x86/platform/intel-mid: Don't shadow error code of mp_map_gsi_to_irq() Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-18 18:50 +0100
[PATCH v3 2/3] x86/platform/intel-mid: Allocate RTC interrupt for Merrifield Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-18 18:50 +0100
Re: [PATCH v3 2/3] x86/platform/intel-mid: Allocate RTC interrupt for Merrifield Thomas Gleixner <tglx@linutronix.de> - 2017-01-19 18:00 +0100
Re: [PATCH v3 2/3] x86/platform/intel-mid: Allocate RTC interrupt for Merrifield Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-01-19 18:10 +0100
csiph-web