提交 93953395 编写于 作者: A Andy Shevchenko 提交者: Thomas Gleixner

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: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: http://lkml.kernel.org/r/20170119192425.189899-4-andriy.shevchenko@linux.intel.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 910a26f6
...@@ -28,9 +28,9 @@ static struct platform_device wdt_dev = { ...@@ -28,9 +28,9 @@ static struct platform_device wdt_dev = {
static int tangier_probe(struct platform_device *pdev) static int tangier_probe(struct platform_device *pdev)
{ {
int gsi;
struct irq_alloc_info info; struct irq_alloc_info info;
struct intel_mid_wdt_pdata *pdata = pdev->dev.platform_data; struct intel_mid_wdt_pdata *pdata = pdev->dev.platform_data;
int gsi, irq;
if (!pdata) if (!pdata)
return -EINVAL; return -EINVAL;
...@@ -38,10 +38,10 @@ static int tangier_probe(struct platform_device *pdev) ...@@ -38,10 +38,10 @@ static int tangier_probe(struct platform_device *pdev)
/* IOAPIC builds identity mapping between GSI and IRQ on MID */ /* IOAPIC builds identity mapping between GSI and IRQ on MID */
gsi = pdata->irq; gsi = pdata->irq;
ioapic_set_alloc_attr(&info, cpu_to_node(0), 1, 0); ioapic_set_alloc_attr(&info, cpu_to_node(0), 1, 0);
if (mp_map_gsi_to_irq(gsi, IOAPIC_MAP_ALLOC, &info) <= 0) { irq = mp_map_gsi_to_irq(gsi, IOAPIC_MAP_ALLOC, &info);
dev_warn(&pdev->dev, "cannot find interrupt %d in ioapic\n", if (irq < 0) {
gsi); dev_warn(&pdev->dev, "cannot find interrupt %d in ioapic\n", gsi);
return -EINVAL; return irq;
} }
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册