aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/wd.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2013-10-21 15:05:39 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-29 19:20:43 -0400
commit50f67a06713599e18cd9141e413d0e2653bb242b (patch)
treed3b96f356d7133a98df05d6f22cce367473628b8 /drivers/misc/mei/wd.c
parentc4e87b525936da188add18d53a0fe681c3c977ce (diff)
mei: wd: host_init propagate error codes from called functions
Propagate error codes from called functions, they are correct. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/wd.c')
-rw-r--r--drivers/misc/mei/wd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/misc/mei/wd.c b/drivers/misc/mei/wd.c
index b8921432e89d..9e354216c163 100644
--- a/drivers/misc/mei/wd.c
+++ b/drivers/misc/mei/wd.c
@@ -60,7 +60,7 @@ static void mei_wd_set_start_timeout(struct mei_device *dev, u16 timeout)
60int mei_wd_host_init(struct mei_device *dev) 60int mei_wd_host_init(struct mei_device *dev)
61{ 61{
62 struct mei_cl *cl = &dev->wd_cl; 62 struct mei_cl *cl = &dev->wd_cl;
63 int i; 63 int id;
64 int ret; 64 int ret;
65 65
66 mei_cl_init(cl, dev); 66 mei_cl_init(cl, dev);
@@ -70,19 +70,19 @@ int mei_wd_host_init(struct mei_device *dev)
70 70
71 71
72 /* check for valid client id */ 72 /* check for valid client id */
73 i = mei_me_cl_by_uuid(dev, &mei_wd_guid); 73 id = mei_me_cl_by_uuid(dev, &mei_wd_guid);
74 if (i < 0) { 74 if (id < 0) {
75 dev_info(&dev->pdev->dev, "wd: failed to find the client\n"); 75 dev_info(&dev->pdev->dev, "wd: failed to find the client\n");
76 return -ENOENT; 76 return id;
77 } 77 }
78 78
79 cl->me_client_id = dev->me_clients[i].client_id; 79 cl->me_client_id = dev->me_clients[id].client_id;
80 80
81 ret = mei_cl_link(cl, MEI_WD_HOST_CLIENT_ID); 81 ret = mei_cl_link(cl, MEI_WD_HOST_CLIENT_ID);
82 82
83 if (ret < 0) { 83 if (ret < 0) {
84 dev_info(&dev->pdev->dev, "wd: failed link client\n"); 84 dev_info(&dev->pdev->dev, "wd: failed link client\n");
85 return -ENOENT; 85 return ret;
86 } 86 }
87 87
88 cl->state = MEI_FILE_CONNECTING; 88 cl->state = MEI_FILE_CONNECTING;