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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c4e87b5259
commit
50f67a0671
@@ -60,7 +60,7 @@ static void mei_wd_set_start_timeout(struct mei_device *dev, u16 timeout)
|
|||||||
int mei_wd_host_init(struct mei_device *dev)
|
int mei_wd_host_init(struct mei_device *dev)
|
||||||
{
|
{
|
||||||
struct mei_cl *cl = &dev->wd_cl;
|
struct mei_cl *cl = &dev->wd_cl;
|
||||||
int i;
|
int id;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
mei_cl_init(cl, dev);
|
mei_cl_init(cl, dev);
|
||||||
@@ -70,19 +70,19 @@ int mei_wd_host_init(struct mei_device *dev)
|
|||||||
|
|
||||||
|
|
||||||
/* check for valid client id */
|
/* check for valid client id */
|
||||||
i = mei_me_cl_by_uuid(dev, &mei_wd_guid);
|
id = mei_me_cl_by_uuid(dev, &mei_wd_guid);
|
||||||
if (i < 0) {
|
if (id < 0) {
|
||||||
dev_info(&dev->pdev->dev, "wd: failed to find the client\n");
|
dev_info(&dev->pdev->dev, "wd: failed to find the client\n");
|
||||||
return -ENOENT;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
cl->me_client_id = dev->me_clients[i].client_id;
|
cl->me_client_id = dev->me_clients[id].client_id;
|
||||||
|
|
||||||
ret = mei_cl_link(cl, MEI_WD_HOST_CLIENT_ID);
|
ret = mei_cl_link(cl, MEI_WD_HOST_CLIENT_ID);
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_info(&dev->pdev->dev, "wd: failed link client\n");
|
dev_info(&dev->pdev->dev, "wd: failed link client\n");
|
||||||
return -ENOENT;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
cl->state = MEI_FILE_CONNECTING;
|
cl->state = MEI_FILE_CONNECTING;
|
||||||
|
Reference in New Issue
Block a user