From: Andy Shevchenko Date: Wed, 16 Sep 2015 14:24:02 +0000 (+0300) Subject: i2c: ismt: issue a warning when fail to request MSI X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=064181b00e33c917145194247b4abcfa36ca06d7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Mika Westerberg Signed-off-by: Wolfram Sang --- diff --git a/drivers/i2c/busses/i2c-ismt.c b/drivers/i2c/busses/i2c-ismt.c index 21cd4f6636bf..80648be36cce 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; }