summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2015-09-16 17:24:02 +0300
committerWolfram Sang <wsa@the-dreams.de>2015-10-20 16:51:42 +0200
commit064181b00e33c917145194247b4abcfa36ca06d7 (patch)
tree1640f8e59c3f5f4bc9174e9af77072bc07ed8d23 /drivers/i2c/busses
parent6befa6dd8de73fd726f3b69b63e4aa7b17a25531 (diff)
downloadop-kernel-dev-064181b00e33c917145194247b4abcfa36ca06d7.zip
op-kernel-dev-064181b00e33c917145194247b4abcfa36ca06d7.tar.gz
i2c: ismt: issue a warning when fail to request MSI
Issue the warning in all error paths when unable to register MSI or its handler. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r--drivers/i2c/busses/i2c-ismt.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/i2c/busses/i2c-ismt.c b/drivers/i2c/busses/i2c-ismt.c
index 21cd4f6..80648be 100644
--- a/drivers/i2c/busses/i2c-ismt.c
+++ b/drivers/i2c/busses/i2c-ismt.c
@@ -788,11 +788,8 @@ static int ismt_int_init(struct ismt_priv *priv)
/* Try using MSI interrupts */
err = pci_enable_msi(priv->pci_dev);
- if (err) {
- dev_warn(&priv->pci_dev->dev,
- "Unable to use MSI interrupts, falling back to legacy\n");
+ if (err)
goto intx;
- }
err = devm_request_irq(&priv->pci_dev->dev,
priv->pci_dev->irq,
@@ -805,10 +802,13 @@ static int ismt_int_init(struct ismt_priv *priv)
goto intx;
}
- goto done;
+ return 0;
/* Try using legacy interrupts */
intx:
+ dev_warn(&priv->pci_dev->dev,
+ "Unable to use MSI interrupts, falling back to legacy\n");
+
err = devm_request_irq(&priv->pci_dev->dev,
priv->pci_dev->irq,
ismt_do_interrupt,
@@ -820,7 +820,6 @@ intx:
return err;
}
-done:
return 0;
}
OpenPOWER on IntegriCloud