Commit 064181b0 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Wolfram Sang

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 6befa6dd
...@@ -788,11 +788,8 @@ static int ismt_int_init(struct ismt_priv *priv) ...@@ -788,11 +788,8 @@ static int ismt_int_init(struct ismt_priv *priv)
/* Try using MSI interrupts */ /* Try using MSI interrupts */
err = pci_enable_msi(priv->pci_dev); err = pci_enable_msi(priv->pci_dev);
if (err) { if (err)
dev_warn(&priv->pci_dev->dev,
"Unable to use MSI interrupts, falling back to legacy\n");
goto intx; goto intx;
}
err = devm_request_irq(&priv->pci_dev->dev, err = devm_request_irq(&priv->pci_dev->dev,
priv->pci_dev->irq, priv->pci_dev->irq,
...@@ -805,10 +802,13 @@ static int ismt_int_init(struct ismt_priv *priv) ...@@ -805,10 +802,13 @@ static int ismt_int_init(struct ismt_priv *priv)
goto intx; goto intx;
} }
goto done; return 0;
/* Try using legacy interrupts */ /* Try using legacy interrupts */
intx: 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, err = devm_request_irq(&priv->pci_dev->dev,
priv->pci_dev->irq, priv->pci_dev->irq,
ismt_do_interrupt, ismt_do_interrupt,
...@@ -820,7 +820,6 @@ static int ismt_int_init(struct ismt_priv *priv) ...@@ -820,7 +820,6 @@ static int ismt_int_init(struct ismt_priv *priv)
return err; return err;
} }
done:
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment