diff options
Diffstat (limited to 'drivers/misc/mei/amthif.c')
| -rw-r--r-- | drivers/misc/mei/amthif.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c index 79f53941779d..c4cb9a984a5f 100644 --- a/drivers/misc/mei/amthif.c +++ b/drivers/misc/mei/amthif.c | |||
| @@ -97,23 +97,25 @@ int mei_amthif_host_init(struct mei_device *dev) | |||
| 97 | /* allocate storage for ME message buffer */ | 97 | /* allocate storage for ME message buffer */ |
| 98 | msg_buf = kcalloc(dev->iamthif_mtu, | 98 | msg_buf = kcalloc(dev->iamthif_mtu, |
| 99 | sizeof(unsigned char), GFP_KERNEL); | 99 | sizeof(unsigned char), GFP_KERNEL); |
| 100 | if (!msg_buf) | 100 | if (!msg_buf) { |
| 101 | return -ENOMEM; | 101 | ret = -ENOMEM; |
| 102 | goto out; | ||
| 103 | } | ||
| 102 | 104 | ||
| 103 | dev->iamthif_msg_buf = msg_buf; | 105 | dev->iamthif_msg_buf = msg_buf; |
| 104 | 106 | ||
| 105 | ret = mei_cl_link(cl, MEI_IAMTHIF_HOST_CLIENT_ID); | 107 | ret = mei_cl_link(cl, MEI_IAMTHIF_HOST_CLIENT_ID); |
| 106 | |||
| 107 | if (ret < 0) { | 108 | if (ret < 0) { |
| 108 | dev_err(dev->dev, | 109 | dev_err(dev->dev, "amthif: failed cl_link %d\n", ret); |
| 109 | "amthif: failed link client %d\n", ret); | 110 | goto out; |
| 110 | return ret; | ||
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | ret = mei_cl_connect(cl, NULL); | 113 | ret = mei_cl_connect(cl, NULL); |
| 114 | 114 | ||
| 115 | dev->iamthif_state = MEI_IAMTHIF_IDLE; | 115 | dev->iamthif_state = MEI_IAMTHIF_IDLE; |
| 116 | 116 | ||
| 117 | out: | ||
| 118 | mei_me_cl_put(me_cl); | ||
| 117 | return ret; | 119 | return ret; |
| 118 | } | 120 | } |
| 119 | 121 | ||
