From: Tomas Winkler <tomas.winkler@intel.com>
To: gregkh@linuxfoundation.org
Cc: arnd@arndb.de, linux-kernel@vger.kernel.org,
Tomas Winkler <tomas.winkler@intel.com>
Subject: [char-misc-next 7/7] mei: amthif: mei_amthif_host_init: propagate errors from called functions
Date: Mon, 16 Sep 2013 23:44:48 +0300 [thread overview]
Message-ID: <1379364288-16374-8-git-send-email-tomas.winkler@intel.com> (raw)
In-Reply-To: <1379364288-16374-1-git-send-email-tomas.winkler@intel.com>
propagate error codes from called functions, they are correct.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
drivers/misc/mei/amthif.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c
index 4f259d4..d22c686 100644
--- a/drivers/misc/mei/amthif.c
+++ b/drivers/misc/mei/amthif.c
@@ -79,8 +79,10 @@ int mei_amthif_host_init(struct mei_device *dev)
i = mei_me_cl_by_uuid(dev, &mei_amthif_guid);
if (i < 0) {
- dev_info(&dev->pdev->dev, "amthif: failed to find the client\n");
- return -ENOENT;
+ ret = i;
+ dev_info(&dev->pdev->dev,
+ "amthif: failed to find the client %d\n", ret);
+ return ret;
}
cl->me_client_id = dev->me_clients[i].client_id;
@@ -107,8 +109,9 @@ int mei_amthif_host_init(struct mei_device *dev)
ret = mei_cl_link(cl, MEI_IAMTHIF_HOST_CLIENT_ID);
if (ret < 0) {
- dev_err(&dev->pdev->dev, "amthif: failed link client\n");
- return -ENOENT;
+ dev_err(&dev->pdev->dev,
+ "amthif: failed link client %d\n", ret);
+ return ret;
}
cl->state = MEI_FILE_CONNECTING;
--
1.8.3.1
prev parent reply other threads:[~2013-09-16 20:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-16 20:44 [char-misc-next 0/7] mei minor fixes and cleanups Tomas Winkler
2013-09-16 20:44 ` [char-misc-next 1/7] mei: fix function names in debug prints Tomas Winkler
2013-09-26 15:40 ` Greg KH
2013-09-16 20:44 ` [char-misc-next 2/7] mei: propagate error from write routines instead of ENODEV Tomas Winkler
2013-09-16 20:44 ` [char-misc-next 3/7] mei: push credentials inside the irq write handler Tomas Winkler
2013-09-16 20:44 ` [char-misc-next 4/7] mei: mei_cl_unlink: no need to loop over dev list Tomas Winkler
2013-09-16 20:44 ` [char-misc-next 5/7] mei: simplify mei_open error handling Tomas Winkler
2013-09-16 20:44 ` [char-misc-next 6/7] mei: revamp open handler counts Tomas Winkler
2013-09-16 20:44 ` Tomas Winkler [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=1379364288-16374-8-git-send-email-tomas.winkler@intel.com \
--to=tomas.winkler@intel.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®