[PATCH 3/3] mei: Improve usage of mei_start
From: Heiner Kallweit
Date: Fri Aug 03 2018 - 17:42:31 EST
mei_start() prints an error message and returns -ENODEV on failure,
so we don't have to duplicate this in the caller.
Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx>
---
drivers/misc/mei/pci-me.c | 6 ++----
drivers/misc/mei/pci-txe.c | 6 ++----
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c
index a60376f0..02ba830a 100644
--- a/drivers/misc/mei/pci-me.c
+++ b/drivers/misc/mei/pci-me.c
@@ -208,11 +208,9 @@ static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto end;
}
- if (mei_start(dev)) {
- dev_err(&pdev->dev, "init hw failure.\n");
- err = -ENODEV;
+ err = mei_start(dev);
+ if (err)
goto release_irq;
- }
pm_runtime_set_autosuspend_delay(&pdev->dev, MEI_ME_RPM_TIMEOUT);
pm_runtime_use_autosuspend(&pdev->dev);
diff --git a/drivers/misc/mei/pci-txe.c b/drivers/misc/mei/pci-txe.c
index 3ea2b8f6..901574be 100644
--- a/drivers/misc/mei/pci-txe.c
+++ b/drivers/misc/mei/pci-txe.c
@@ -120,11 +120,9 @@ static int mei_txe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto end;
}
- if (mei_start(dev)) {
- dev_err(&pdev->dev, "init hw failure.\n");
- err = -ENODEV;
+ err = mei_start(dev);
+ if (err)
goto release_irq;
- }
pm_runtime_set_autosuspend_delay(&pdev->dev, MEI_TXI_RPM_TIMEOUT);
pm_runtime_use_autosuspend(&pdev->dev);
--
2.18.0