]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
mei: amthif: mei_amthif_host_init: propagate errors from called functions
authorTomas Winkler <tomas.winkler@intel.com>
Mon, 16 Sep 2013 20:44:48 +0000 (23:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Oct 2013 23:01:16 +0000 (16:01 -0700)
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>
drivers/misc/mei/amthif.c

index 4f259d411a2c245ab6df0a49cd5e37417afbfa38..d22c6864508b2de3505f56fa7c0a44b97dbe90fb 100644 (file)
@@ -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;