lkml.org 
[lkml]   [2018]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 3/3] mei: Improve usage of mei_start
From
Date
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@gmail.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

\
 
 \ /
  Last update: 2018-08-03 23:43    [W:0.042 / U:2.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site