diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-01-19 14:24:24 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-01-20 04:07:41 -0500 |
commit | 939533955d1f1d51e8e37d7d675646ce9d55534b (patch) | |
tree | f1d93f548b44e4168766c21e12c9e0d5661dfcd8 | |
parent | 910a26f6e952148a0c8815281737aaead640626c (diff) |
x86/platform/intel-mid: Don't shadow error code of mp_map_gsi_to_irq()
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>
Link: http://lkml.kernel.org/r/20170119192425.189899-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/platform/intel-mid/device_libs/platform_mrfld_wdt.c | 10 |
1 files 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 = { | |||
28 | 28 | ||
29 | static int tangier_probe(struct platform_device *pdev) | 29 | static int tangier_probe(struct platform_device *pdev) |
30 | { | 30 | { |
31 | int gsi; | ||
32 | struct irq_alloc_info info; | 31 | struct irq_alloc_info info; |
33 | struct intel_mid_wdt_pdata *pdata = pdev->dev.platform_data; | 32 | struct intel_mid_wdt_pdata *pdata = pdev->dev.platform_data; |
33 | int gsi, irq; | ||
34 | 34 | ||
35 | if (!pdata) | 35 | if (!pdata) |
36 | return -EINVAL; | 36 | return -EINVAL; |
@@ -38,10 +38,10 @@ static int tangier_probe(struct platform_device *pdev) | |||
38 | /* IOAPIC builds identity mapping between GSI and IRQ on MID */ | 38 | /* IOAPIC builds identity mapping between GSI and IRQ on MID */ |
39 | gsi = pdata->irq; | 39 | gsi = pdata->irq; |
40 | ioapic_set_alloc_attr(&info, cpu_to_node(0), 1, 0); | 40 | ioapic_set_alloc_attr(&info, cpu_to_node(0), 1, 0); |
41 | if (mp_map_gsi_to_irq(gsi, IOAPIC_MAP_ALLOC, &info) <= 0) { | 41 | irq = mp_map_gsi_to_irq(gsi, IOAPIC_MAP_ALLOC, &info); |
42 | dev_warn(&pdev->dev, "cannot find interrupt %d in ioapic\n", | 42 | if (irq < 0) { |
43 | gsi); | 43 | dev_warn(&pdev->dev, "cannot find interrupt %d in ioapic\n", gsi); |
44 | return -EINVAL; | 44 | return irq; |
45 | } | 45 | } |
46 | 46 | ||
47 | return 0; | 47 | return 0; |