[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8d5151fb-88dc-b4cf-843a-9519516ccd36@gmail.com>
Date: Fri, 3 Aug 2018 23:42:09 +0200
From: Heiner Kallweit <hkallweit1@...il.com>
To: Tomas Winkler <tomas.winkler@...el.com>
Cc: Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: [PATCH 3/3] mei: Improve usage of mei_start
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@...il.com>
---
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
Powered by blists - more mailing lists