public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Tomas Winkler <tomas.winkler@intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH 3/3] mei: Improve usage of mei_start
Date: Fri, 3 Aug 2018 23:42:09 +0200	[thread overview]
Message-ID: <8d5151fb-88dc-b4cf-843a-9519516ccd36@gmail.com> (raw)
In-Reply-To: <5e0250ff-2470-1128-d8eb-b36e3ca04417@gmail.com>

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



      parent reply	other threads:[~2018-08-03 21:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-03 21:37 [PATCH 0/3] mei: migrate to pci_alloc_irq_vectors and smaller improvements Heiner Kallweit
2018-08-03 21:39 ` [PATCH 1/3] mei: Don't free irq when suspending Heiner Kallweit
2018-08-03 21:40 ` [PATCH 2/3] mei: Migrate to pci_alloc_irq_vectors API Heiner Kallweit
2018-08-05 11:02   ` Winkler, Tomas
2018-08-05 11:18     ` Heiner Kallweit
2018-08-03 21:42 ` Heiner Kallweit [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8d5151fb-88dc-b4cf-843a-9519516ccd36@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tomas.winkler@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox